instructree – skill Lập trình cho agent AI
Lập bản đồ, giải thích và kiểm tra lint các hướng dẫn coding-agent theo phạm vi repository trước khi thay đổi code.
Cài skill instructree bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/instructree-84a8b.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /instructree – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/instructree-84a8b.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $instructree – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/instructree-84a8b.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /instructree – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/instructree-84a8b.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /instructree – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Instructree
Overview
Use Instructree to establish which instruction files exist, which may apply to a target, and whether their metadata, links, or recursive imports are malformed. It audits common coding-agent instruction formats locally without calling a model or uploading repository content.
When to Use This Skill
- Use before changing code in a repository with
AGENTS.md,CLAUDE.md, Copilot instructions, agent skills, custom agents, Cursor rules, or Windsurf rules. - Use when the user asks which instructions may apply to one target file.
- Use when auditing recursive Copilot CLI
@pathimports or exporting instruction diagnostics to CI.
How It Works
Step 1: Choose the local command
Work from the repository root. Prefer an already installed instructree command or the checked-out package's local binary.
If neither is available, explain that the next command downloads executable package code and ask for approval before running the pinned release:
npx github:kotobuki09/instructree#364dddc66badac13a284b79f0dc71f2b4362f6de scan .Do not add --yes unless the user authorized non-interactive package downloads.
Step 2: Run the narrowest audit
instructree scan . --jsoninventories supported files and emits stable diagnostics.instructree explain <file> --root .shows instructions that may apply to one target.instructree explain <file> --root . --effectiveincludes recursive Copilot CLI imports.instructree imports . --jsonaudits the recursive@pathgraph.instructree scan . --sarifemits SARIF 2.1.0 for code-scanning integrations.- Add
--strictonly when warnings should fail the check.
Step 3: Interpret the result
Report file paths, line numbers, diagnostic codes, and the command's exit status. Separate schema or path errors from warnings. Describe always/never conflicts as possible conflicts requiring human review, not proof of agent behavior.
Examples
Audit a repository
instructree scan . --jsonExplain one target with recursive imports
instructree explain src/api/client.ts --root . --effectiveGenerate a code-scanning report
instructree scan . --sarif > instructree.sarifBest Practices
- Prefer a local, already reviewed command over downloading package code.
- Use
explainfor a single target instead of scanning more scope than needed. - Rerun the same command after an authorized instruction fix and report before-and-after diagnostics.
- Keep warnings separate from errors and state clearly when a finding is heuristic.
Limitations
- Instructree is static analysis; it does not establish the exact precedence rules or runtime behavior of every agent client.
- Client discovery and import behavior can change, so
explainreports what may apply rather than predicting what a model will follow. - The audit does not prove that instruction content is correct, safe, or effective.
- Do not edit instruction files unless the user asked for changes.
Security & Safety Notes
- Scans are read-only and local; they do not call a model or upload repository content.
- Treat any
npxfallback as executable third-party code: keep it pinned, review the source, and obtain approval before download. - Do not run imported instruction content. Instructree follows supported references as data only.
Skill liên quan
- interactive-portfolio – Chuyên gia xây dựng portfolio giúp tìm được việc và khách hàng, không chỉ trưng bày sản…
- tc-tracker – Dùng khi người dùng yêu cầu theo dõi thay đổi kỹ thuật, tạo bản ghi thay đổi, quản lý…
- interview-me – Khơi gợi điều người dùng thực sự muốn bằng cách hỏi từng câu một cho đến khi ý định rõ…
- tdd-guide – Kỹ năng phát triển hướng kiểm thử (TDD) để viết unit test, tạo fixture và mock, phân…
- ios-debugger-agent – Gỡ lỗi dự án iOS hiện tại trên simulator đang chạy bằng XcodeBuildMCP.
- ios-developer – Phát triển ứng dụng iOS native với Swift/SwiftUI. Thành thạo iOS 18, SwiftUI, tích hợp…
- issues – Tương tác với GitHub issues — tạo, liệt kê và xem issues.
- tech-debt-tracker – Quét mã nguồn để tìm nợ kỹ thuật, chấm mức độ nghiêm trọng, theo dõi xu hướng và lập kế…