astkit-tooling
1
总安装量
1
周安装量
#50215
全站排名
安装命令
npx skills add https://github.com/claudiuceia/astkit --skill astkit-tooling
Agent 安装分布
codex
1
Skill 文档
astkit tooling
Use astkit for token-efficient repository exploration and structural edits in TS/JS projects.
Keep scope narrow first, expand only when evidence is insufficient.
Quick Start
- Confirm tool availability.
astkit --help- or
npx astkit --help - or
bunx astkit --help
- Start with one focused operation.
astkit nav declarations <file>astkit nav definition <file:line:character>astkit nav references <file:line:character>astkit search '<pattern>' <scope> --jsonastkit patch --dry-run '<patch-document>' <scope>astkit code-rank <scope> --limit 25 --json
- Expand scope only if needed.
Working Workflow
- Map contracts before implementation details.
- Use
nav declarationsandnav definitionfirst. - Treat signatures/docs as intended contracts until contradicted by evidence.
- Clarify behavior from usage.
- Use
nav referencesto inspect representative callsites. - Prefer usage patterns over deep source reading for initial understanding.
- Estimate blast radius before edits.
- Use
code-rankand references to identify high-impact symbols. - Prefer localized changes when task scope is localized.
- Rewrite with structural tools.
- Use
searchto find candidate shapes. - Use
patch --dry-runbefore writing changes. - Use
patch --interactivefor high-risk or broad rewrites.
- Re-check and validate.
- Re-run focused
search/nav referenceson touched symbols. - Validate with
tscand relevant tests when available.
Safe Rewrite Workflow
- Find candidate sites.
astkit search '<pattern>' <scope> --json
- Preview rewrite.
astkit patch --dry-run '<patch-document>' <scope>
- Apply rewrite.
astkit patch '<patch-document>' <scope>- Use
--interactivefor high-risk or broad edits.
- Re-check surfaced contracts.
- Re-run focused
searchqueries andnav referenceson touched symbols.
- Validate with compiler and tests.
- Run
tscdiagnostics. - Run focused tests for touched behavior.
Reporting Contract
When reporting findings, include:
- system boundaries and entry points
- invariants/contracts with explicit status (
observedvsinferred) - definition/reference flow summary
- change hotspots/dependency hubs
- suggested edits with blast-radius notes
- validation status and remaining gaps
Keep output concise and include file paths/spans where possible.
Guardrails
- Structural similarity does not imply behavioral equivalence.
- Structural rewrites reduce accidental matches but do not guarantee correctness.
- Reference ranking approximates impact, not runtime criticality.
- No matches do not prove absence of behavior.
- Do not use this skill as a substitute for compiler diagnostics or tests.
Common Failure Modes
- Too many matches: narrow scope, add delimiters, add regex constraints.
- No matches: verify pattern shape, scope, and
--no-isomorphismsusage. - Rewrite too broad: switch to
--interactiveand re-run dry-run first. - Unclear impact: inspect
nav referencesandcode-rankbefore applying.
References
./references/cognitive-model.md./references/non-goals.md