Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

codecontext-setup代码上下文设置

Agent Skill

codecontext-setup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,380

周安装

317

GitHub Stars

5

下载量

2,587
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codecontext-setup(代码上下文设置)
来源仓库:https://github.com/recallnet/codecontext
仓库路径:skills/codecontext-setup
安装命令:
npx skills add https://github.com/recallnet/codecontext --skill codecontext-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/recallnet/codecontext --skill codecontext-setup

简介

codecontext-setup 用于建立代码上下文的标准化设置,使 Agent 能正确使用。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 AI 助手理解项目上下文时使用。
  • 重点在于建立清晰的工具链位置和文档引用规范,而不是发明新的文档格式。
  • 安装前建议确认项目现有的文档体系和工具链结构,注意要尊重用户已有的约定。
  • 提供 AGENTS.md 编写指导和 @context 引用的标准化处理方法。

SKILL.md

Codecontext Setup

Set up codecontext so agents can use it without guessing.

The point of this skill is not just package installation. The real job is to make the repo's agent contract coherent:

  • the toolchain is installed where it belongs
  • AGENTS.md tells agents when and how to use it
  • inline @context is treated as the required structured layer
  • supporting refs stay unconstrained and user-owned

Do not invent required sidecar document schemas. Do not require .ctx.md. Refs can point to Markdown, HTML, text, diagrams, exported docs, or any other resolvable file the repo uses.

When to use

Use this skill when the user asks to:

  • install or adopt codecontext
  • update a repo's AGENTS.md or agent guidance around @context
  • audit a project's current codecontext setup
  • reconcile a mismatch between codecontext tooling and repo instructions
  • improve how agents discover decisions, risks, assumptions, and history

Outcome

By the end of this workflow, the repo should have:

  • a clear AGENTS.md section for codecontext
  • a sane CLI workflow for agents
  • the right enforcement surface for the repo's languages and toolchain
  • no misleading guidance about structured sidecar docs

Workflow

1. Audit the current state

Inspect:

  • package manager and workspace layout
  • whether the repo already depends on @recallnet/codecontext-cli
  • whether the repo already depends on @recallnet/codecontext-eslint-plugin
  • whether the repo already has Python, Go, Rust, or other language-native
  • whether the repo already has Python, Go, Ruby, Rust, or other language-native checkers where codecontext enforcement belongs
  • whether ESLint is present and where its shared config lives
  • whether AGENTS.md exists at repo root and in subtrees/worktrees
  • whether existing agent docs already mention @context, codecontext, ADRs, contexts/, or decision logs

Look for the two common failure modes:

  1. tool installed, but no agent workflow or guidance
  2. guidance exists, but it is stale, contradictory, or points to a policy that does not exist

2. Decide the installation surface

Install the minimum useful surface:

  • @recallnet/codecontext-cli when agents should run --scope, --diff, or --report
  • @recallnet/codecontext-eslint-plugin when the repo uses ESLint and wants comment validation
  • a language-native checker or analyzer when the repo's main enforcement surface is Python, Go, Rust, or something else outside ESLint
  • @recallnet/codecontext-parser only if the repo has custom code that imports parser APIs directly

Do not add packages the repo is not going to use.

3. Fix AGENTS.md before or alongside package changes

codecontext setup is incomplete without agent instructions.

Every repo-level AGENTS.md section should cover:

  • what @context is for
  • when annotations are required
  • a small preferred taxonomy
  • the pre-edit and post-edit workflow
  • what refs are and are not
  • anti-patterns

If subtree AGENTS.md files point to a repo-level policy, make sure that policy actually exists.

Recommended AGENTS.md contract

Keep it short. A good section usually fits in 8-14 bullets.

Use something close to this:

- **codecontext**: Use inline `@context` annotations for non-obvious,
  high-value reasoning that future edits could easily erase.
  - Required for:
    - critical decision logic and invariants
    - security-sensitive behavior and hard-won lessons
    - external integration quirks and contract mismatches
    - regression guards explaining why a simpler change would be wrong
  - Preferred forms: `@context decision`, `@context risk`,
    `@context requirement`, `@context history`
  - Keep notes short and specific: what is true, why it matters, and what
    would break if changed
  - Use `{@link ...}` for supporting material when helpful, but refs are just pointers
    to repo files or docs. Do not require any special doc schema.
  - Before editing critical files, run:
    `npx @recallnet/codecontext-cli --scope <file>`
  - After editing, run:
    `npx @recallnet/codecontext-cli --diff HEAD <file>`
  - For broader orientation in larger repos, run:
    `npx @recallnet/codecontext-cli --report`
  - Do not use `@context` for obvious narration, duplicated ADR prose, or
    generic comments.

Adjust the taxonomy only if the repo clearly needs more than the baseline (decision, risk, requirement, history). Add extra categories sparingly.

Guidance for repos with ADRs or large docs trees

If the repo already uses ADRs, plans, runbooks, or architecture docs:

  • keep @context as the inline agent-facing layer
  • treat refs as optional expansion targets
  • do not tell agents to browse the entire docs tree by default
  • do not mirror whole ADRs inline

The correct model is:

  • @context carries the structured local signal
  • refs point to arbitrary supporting material
  • agents expand refs only when needed

Refs policy

Be explicit:

  • refs are allowed to point to .md, .html, .txt, diagrams, exports, or other repo artifacts
  • refs are not required on every annotation
  • refs should not impose a schema on the target file

Do not write guidance that implies:

  • .ctx.md is required
  • frontmatter is required
  • the linked file must be machine-parseable

CLI workflow guidance

Recommend these commands in agent docs when the CLI is installed:

npx @recallnet/codecontext-cli --scope path/to/file.ts
npx @recallnet/codecontext-cli --diff HEAD path/to/file.ts
npx @recallnet/codecontext-cli --report

Use --report for repo orientation and decision review. Use --scope and --diff around concrete edits.

Enforcement guidance

If the repo already has a shared ESLint config, integrate the plugin there. Prefer enforcing syntax and stale/invalid ref checks centrally rather than telling agents to self-police.

If the repo does not use ESLint, do not force it just for codecontext. Prefer the native enforcement surface for the repo's actual stack:

  • Python repo: native checker or PyPI-distributed tool
  • Go repo: analyzer / golangci-lint integration
  • Ruby repo: native checker gem or RuboCop-style integration
  • Rust repo: crate / Clippy-style integration
  • mixed or tool-agnostic repo: CLI workflow may be enough initially

The important question is not "did we install the ESLint plugin?" It is "what actually enforces @context correctness in this ecosystem?"

What to look for in a review

Flag these as setup defects:

  • child AGENTS.md files pointing to a missing repo policy
  • instructions that mention @context but give no workflow
  • workflow guidance that ignores --report in large repos
  • guidance that treats linked docs as required structured sidecars
  • package installs without corresponding agent documentation
  • documentation that tells agents to read giant ADR/doc trees by default

Delivery

When you finish setup or audit work:

  1. state what was installed or changed
  2. call out any stale or contradictory AGENTS.md guidance you fixed
  3. mention any remaining gaps
  4. if you did not install an enforcement surface, explain why

Default recommendation

If the repo has no existing codecontext guidance, prefer creating a codecontext-setup section in the root AGENTS.md rather than scattering instructions across multiple child docs first.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.29%
按下载量换算913

Claude

32%
按下载量换算828

Cursor

21.03%
按下载量换算544

Gemini CLI

9.22%
按下载量换算239

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills