Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/fengshao1227/ccg-workflow/contextgit clone --depth 1 https://github.com/fengshao1227/ccg-workflowWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00023 | $0.02482 |
| Opus 5 | $0.00012 | $0.01241 |
| Sonnet 5 | $0.00005 | $0.00496 |
| Haiku 4.5 | $0.00002 | $0.00248 |
Grade A, and why
context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- context — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context - 项目上下文管理
管理 .context/ 目录结构,为 LLM 工具提供决策审计链。
使用方法
/context <subcommand> [options]
子命令
| 子命令 | 说明 |
|---|---|
init |
初始化 .context/ 目录结构 |
log <message> |
(可选)手动追加备注到 session.log,commit 时会合并 |
show |
查看当前分支的 session.log |
compress |
压缩 session.log → uncommit.md(手动预览用) |
history |
查看 history/commits.md |
squash <ids...> |
合并多条 history 记录(配合 git squash) |
核心用法:
init一次,之后只管开发。/ccg:commit提交时自动从 git diff 分析决策并归档到 history/。log仅在你想手动补充备注时使用。
执行工作流
子命令:init
[模式:初始化]
在当前项目根目录创建 .context/ 结构:
- 检测项目根目录(查找
.git/) - 若
.context/已存在,跳过已有文件,仅补全缺失 - 创建以下结构:
.context/
├── .gitignore
├── .gitattributes
├── prefs/
│ ├── coding-style.md
│ └── workflow.md
├── current/
│ └── branches/
│ └── .gitkeep
└── history/
├── commits.jsonl
├── commits.md
└── archives/
└── .gitkeep
- 创建
.context/.gitignore:
# Ephemeral workspace — never commit
current/
# Raw interaction logs — always local only
**/session.log
**/session.raw.log
**/*.session.log
**/*.raw.log
# Editor / temp
**/*.tmp
**/*.bak
**/*.swp
- 创建
.context/.gitattributes:
# JSONL append-only: 'union' merge reduces conflicts
history/commits.jsonl merge=union
history/archives/*.jsonl merge=union
- 创建
.context/prefs/coding-style.md(团队编码规范模板):
# Coding Style Guide
> 此文件定义团队编码规范,所有 LLM 工具在修改代码时必须遵守。
> 提交到 Git,团队共享。
## General
- Prefer small, reviewable changes; avoid unrelated refactors.
- Keep functions short (<50 lines); avoid deep nesting (≤3 levels).
- Name things explicitly; no single-letter variables except loop counters.
- Handle errors explicitly; never swallow errors silently.
## Language-Specific
<!-- 根据项目语言补充,例如:-->
<!-- ### TypeScript -->
<!-- - Use strict mode; prefer `interface` over `type` for object shapes. -->
## Git Commits
- Conventional Commits, imperative mood.
- Atomic commits: one logical change per commit.
## Testing
- Every feat/fix MUST include corresponding tests.
- Coverage must not decrease.
- Fix flow: write failing test FIRST, then fix code.
## Security
- Never log secrets (tokens/keys/cookies/JWT).
- Validate inputs at trust boundaries.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 333 lines · 23 tokens per session scan A 6f0773fbd632
context is a command published in the GitHub repository fengshao1227/ccg-workflow (5,865 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 2,482 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
OPSX: Bulk Archive
Archive multiple completed changes at once.
OPSX: Continue
Continue working on a change - create the next artifact (Experimental).
OPSX: New
Start a new change using the experimental artifact workflow (OPSX).
OPSX: Verify
Verify implementation matches change artifacts before archiving.
new
Starts a new end-to-end need (preflight, team, spawn OR).
OPSX: Onboard
Guided onboarding - walk through a complete OpenSpec workflow cycle with narration.