跳到正文
Skillpedia
通用编程48k · #4954

instructree

它能做什么

Instructree 会检查 AI 智能体的指令文件。在你修改代码之前,它会确保这些指令写得规范,没有格式错误或失效的链接。

适用场景

  • ✓在修改使用了 AI 指令的项目代码之前。
  • ✓当你想知道哪些指令适用于某个特定文件时。
  • ✓当你想检查指令中的链接或引用是否有错误时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/instructree/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/instructree/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查一下这个项目里的 AI 指令。”

每周 5 个新技能,1 分钟读完。

工作原理

Instructree 会在你的电脑本地分析指令文件,检查格式错误、失效链接和导入问题,无需把你的代码上传到云端。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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 @path imports 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 . --json inventories supported files and emits stable diagnostics.
  • instructree explain <file> --root . shows instructions that may apply to one target.
  • instructree explain <file> --root . --effective includes recursive Copilot CLI imports.
  • instructree imports . --json audits the recursive @path graph.
  • instructree scan . --sarif emits SARIF 2.1.0 for code-scanning integrations.
  • Add --strict only 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 . --json

Explain one target with recursive imports

instructree explain src/api/client.ts --root . --effective

Generate a code-scanning report

instructree scan . --sarif > instructree.sarif

Best Practices

  • Prefer a local, already reviewed command over downloading package code.
  • Use explain for 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 explain reports 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 npx fallback 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.
常见问题

Instructree 会执行指令中的代码吗?

不会。它只读取并分析指令文件,不会运行任何代码,也不会把你的代码发送到其他地方。

什么是“AI 指令”?

这些文件告诉 AI 智能体(比如 Claude Code)应该如何表现,或者在编程项目中执行哪些任务。

“静态分析”是什么意思?

意思是 Instructree 在不运行代码的情况下检查代码,就像校对员读文章时查找语法和拼写错误,只是不需要朗读出来。

详情

作者的原始描述

Map, explain, and lint repository-scoped coding-agent instructions before changing code.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4954
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能