skills/context-codebase/SKILL.md
Project context engine for repo orientation, cached handoff, and task-focused code retrieval.
npx skillsauth add jochenyang/jochen-ai-rules context-codebaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Project context engine for fast repo orientation, cached handoff, and task-focused code retrieval.
Artifacts:
{project}/repo/progress/context-codebase.json{project}/repo/progress/context-codebase.index.json{project}/repo/progress/context-codebase.dbUse this skill when you need to:
Skip this skill when:
/context-codebaseDefault entry.
Behavior:
Use it when:
/context-codebase refreshIncrementally update the index and cache metadata.
Behavior:
read / report to refresh before answeringUse it when:
read / report to consume the freshest snapshot first/context-codebase readFocused retrieval mode.
Behavior:
filessnippetsflowAnchorsnextHopssearchScopehotspotsexternalContextUse it when:
Host requirements:
files, snippets, nextHops, and searchScopePreferred opening:
我将直接读取已有快照和索引,不重新扫描仓库。我会先用 read payload 里的 files、snippets 和 nextHops 做定点读取,不先做全仓搜索。Avoid:
我先重新加载项目上下文。我先重新扫描仓库。Read answer contract:
read as a quick implementation summary, not a deep technical reportreport/context-codebase reportDeep-analysis mode.
Behavior:
deep-pack for host-side deep report generationdeep-pack generation as the default stopping point for the parent threadUse it when:
Host requirements:
deep-pack to a subagent or delegated workerRead / Search expansion after the pack is
generated unless delegation is unavailablePreferred opening:
我将基于已有快照和索引生成 deep-pack,不重新扫描仓库。如果宿主支持 subagent,我会优先把 deep-pack 交给子任务处理。在可委派的情况下,我会停在 deep-pack 边界,不在主线程继续展开长报告。Avoid:
我先重新分析整个仓库再写报告。deep-pack 已生成,现在我继续在主线程读取关键文件并输出完整长报告。The entrypoint is always scripts/generate.py, but the mode determines whether
source code is scanned or cached artifacts are consumed:
refresh: incrementally updates the index when sources changed and keeps the
existing snapshot structureread: consumes the existing snapshot and index to build a retrieval payloadreport: consumes the existing snapshot and index to build a deep-packImportant clarifications:
python ... generate.py ... --read or --report does not mean the
repo is being rescannedrefresh means "incrementally update the index if needed", not "force rebuild"freshness.reason inside a read or report payload describes how the
current snapshot was produced previously; it does not mean the current
invocation regenerated the snapshotgit.status=dirty means the worktree has uncommitted changes; it does not
automatically prove that the snapshot fingerprint changedThe retrieval pipeline uses FTS5 BM25 keyword search combined with graph-aware expansion and importance boosting:
git_index.py) — annotates chunks with change frequency, hotspot score, churn metric, recent authors, and blame data. Results feed into recent-change-boost and importance-boost retrieval strategies.For read:
files, snippets, flowAnchors, nextHops, and searchScoperepo/progress/, node_modules/, dist/, build/, and
__pycache__/ when widening searchFor report:
coreFiles, snippets, flowAnchors, and recommendedReportShapedeep-pack thereFor focused questions, prefer --task with a UTF-8 safe query channel.
⚠️ Cross-Lingual Search Limitation:
--query "记忆模块", use --query "记忆模块 memory module".On Windows or any environment where non-ASCII query text may become mojibake:
--query-escaped <ascii_only_query>--query-file <utf8_file>--query-stdin--query for non-ASCII input when the shell is unreliableCLI output contract:
Replace {skill_dir} with the actual installed skill path. In this repository,
that path is context-codebase/.
python {skill_dir}/scripts/generate.py <project_path>
python {skill_dir}/scripts/generate.py <project_path> refresh
python {skill_dir}/scripts/generate.py <project_path> --read
python {skill_dir}/scripts/generate.py <project_path> --read --refresh
python {skill_dir}/scripts/generate.py <project_path> --read --task feature-delivery --query "skill lifecycle runtime"
python {skill_dir}/scripts/generate.py <project_path> --read --task feature-delivery --query-escaped "\\u6280\\u80fd\\u7ba1\\u7406\\u5668\\u5982\\u4f55\\u5b9e\\u73b0"
python {skill_dir}/scripts/generate.py <project_path> --read --task feature-delivery --query-file query.txt
python {skill_dir}/scripts/generate.py <project_path> --report --task feature-delivery --query "skill download flow"
cat query.txt | python {skill_dir}/scripts/generate.py <project_path> --read --task feature-delivery --query-stdin
Windows-safe example:
python {skill_dir}/scripts/generate.py <project_path> --read --task feature-delivery --query-escaped "\\u6280\\u80fd\\u4e0b\\u8f7d\\u6d41\\u7a0b"
Read these only when needed:
report protocol, host delegation rules, or deep-pack fields.git, node_modules, dist,
build, __pycache__, and repo/progressread for focused retrieval and report for deep-pack generationreport mode when delegation existsPause and ask the owner before:
Output style is mode-specific:
read:
Skill Fit, Primary Deliverable,
Execution Evidence, Risks / Open Questions, or Next Action in normal
successful reads.report and refresh:
Skill Fit - why context-codebase was the right retrieval pathPrimary Deliverable - snapshot/read/report artifact or answer packageExecution Evidence - cache usage, files indexed, or retrieval sourcesRisks / Open Questions - stale cache risk, missing context, or unresolved ambiguityNext Action - the recommended follow-up retrieval or implementation stepdatabases
Review current conversation, analyze tasks, errors, and user feedback, extract learning opportunities for skill improvement. Use when user says "reflect", "review session", "what did we learn", "session summary", or after completing a complex task.
development
Create and resume structured manual session handoffs for long-running development work. Use when approaching context limits, before manual reset, before switching models or IDEs, after a milestone, or when automatic compact would lose important implementation state.
development
Implement distinctive, production-grade frontend UI code with strong visual direction, motion systems, local media asset generation, conversion-aware copy, and polished frontend execution. Use when building landing pages, marketing sites, product pages, dashboards, motion-heavy interfaces, or frontend experiences that need real assets and compelling copy.
tools
--- name: vercel-deploy description: Deploy projects to Vercel with one command. Use when user wants to deploy to Vercel, publish website, or needs production/preview deployment. Triggers on: "deploy to vercel", "vercel deploy", "发布到vercel", "部署到线上". --- # Vercel Deploy Skill Deploy current project to Vercel using Vercel CLI. ## Quick Start 1. Check if Vercel CLI is installed: ```bash vercel --version ``` If not installed, prompt user to install: ```bash npm i -g vercel ``` 2. Check login