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.
git clone --depth 1 https://github.com/qinye6/pi-ccgWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/qinye6/pi-ccg/context)<a href="https://agentmods.dev/commands/qinye6/pi-ccg/context"><img src="https://agentmods.dev/badge/commands/qinye6/pi-ccg/context/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/qinye6/pi-ccg/context"><img src="https://agentmods.dev/badge/commands/qinye6/pi-ccg/context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00023 | $0.02482 |
| Opus 5.5 | $0.00009 | $0.00993 |
| Sonnet 5.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 1mo ago.
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.
This is a copy
100% identical to context — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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.
- 1mo ago First seen · 333 lines · 23 tokens per session scan A 6f0773fbd632
context is a command published in the GitHub repository qinye6/pi-ccg (4 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 2,482 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to context, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
minutes-ideas
Surface recent voice memos and ideas captured from any device. Use when the user asks "what ideas did I have?", "what were my recent memos?", "what did I record while walking?", or wants to recall a captured thought.
learn
Force claude-smart to extract learnings from this session now.
memory-store
Store an insight, decision, or pattern to memory.
analyze-context
USE WHEN you want to analyze project context before starting work on a task. Calls context + recall, then synthesizes goals, decisions, gotchas, and relevant memories into a pre-task brief.
cc-memory
Configure persistent memory that survives across sessions using a layered approach: split rule files for always-loaded context, auto-memory for organic learning, and optional MCP-backed long-term memory for large codebases.
lians-recall
Recall current (non-stale) facts from Lians memory, optionally as-of a past date.