Agent skill
def
Locate symbol definitions quickly (precise for Python via AST; conservative candidates for other languages) and print a bounded context packet.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/def
SKILL.md
def
Use this skill when
- You need definition locations for a symbol without opening files manually.
- You want minimal, high-signal context for review or refactor work.
Commands
# Auto (tries Python-precise, then other languages as candidates)
def MyClass .
# Prefer Python precision and include a small snippet
def MyClass . --lang py -C 2
# Methods / dotted qualnames (Python): find `Class.method`
def MyClass.__init__ mypkg --lang py -C 1
# Bias path ranking if you know where code likely lives
def MyClass . --prefer torch --prefer aten
Notes
- Python results are AST-validated (low false positives).
- Non-Python results are heuristic candidates; use
ctxto confirm if ambiguous.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?