claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.
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 skills/pedrohcgs/claude-code-my-workflow/compress-sessionnpx skills add pedrohcgs/claude-code-my-workflow --skill compress-sessiongit clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflowWrote 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/skills/pedrohcgs/claude-code-my-workflow/compress-session)<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/compress-session"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/compress-session.svg" alt="Measured on agentmods" 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.00123 | $0.01767 |
| Opus 5 | $0.00062 | $0.00883 |
| Sonnet 5 | $0.00025 | $0.00353 |
| Haiku 4.5 | $0.00012 | $0.00177 |
Grade A, and why
compress-session 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/compress-session — distil, don't truncate
Auto-compaction is lossy: it keeps recent turns and drops earlier ones, with no preservation of what was decided mid-session. /compress-session is the distil-not-truncate alternative — produce a structured note that the next session can resume from in under a minute.
Why this skill exists
Drew Breunig's "How Long Contexts Fail" identifies four failure modes for long-context sessions:
- Poisoning — early hallucinated content gets quoted by later turns, compounding the error.
- Distraction — irrelevant earlier context dilutes the model's attention to current task.
- Confusion — contradicted facts pile up; the model doesn't know which to trust.
- Clash — multiple plans, decisions, or specs accumulate without explicit reconciliation.
The template's 200-line MEMORY.md cap defends against distraction. The plan-on-disk convention defends against clash. Nothing currently defends against poisoning or directly against confusion — that's what this skill is for.
Distinction from /checkpoint
/checkpoint |
/compress-session |
|
|---|---|---|
| When | Explicit stop-point (end of working session, before model switch, before collaborator handoff) | Forced — context is about to auto-compact, or the conversation has accumulated enough noise that distillation pays for itself |
| What's preserved | Active plan, decisions, file pointers, next 1–3 actions | Same, plus an explicit "discarded as noise" line so the next session knows what was intentionally not kept |
| Output location | quality_reports/checkpoints/YYYY-MM-DD_<slug>.md |
quality_reports/session_logs/YYYY-MM-DD_compression_<slug>.md |
| Triggering | User-invoked at a natural pause | User-invoked when context fatigue shows, OR proposed via PreCompact hook |
| Memory updates | Optional auto-proposal of [LEARN] entries |
Always proposes [LEARN] entries — distillation is exactly the moment when generalizable lessons surface |
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.
- 6d ago First seen · 158 lines · 123 tokens per session scan A dcfea42b0dd6
compress-session is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,563 stars, last pushed 12d ago), licensed MIT. It adds 123 tokens to every session and 1,767 once invoked, about $0.0006 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 skills, from other repositories
paper-workflow
经管 / 社科实证论文全流程 meta-orchestrator:把选题、设计、数据、估计、方法闸门、 表图、写作、去 AI 味、质量门、修订、投稿与复盘编排成 Stage 0–9 可断点续跑流水线。 本 skill 不重复实现子能力,而是按阶段调用既有 skill 或并行 subagent,并在 Stage 3–4 路由 Python/StatsPAI、Stata、R 三种分析后端,Stage 9 交付一份含正文+表+图+参考文献的 Word 全文定稿(09submission/main.docx,另可出 .tex)。触发:/paper-workflow、 帮我写一篇实证论文、从选题到投稿、端到端 empirical…
brain-sync
Knowledge sharing lifecycle management.
contribute
Session knowledge contribution to the shared brain.
econ-management-paper-polish
Writing, revision, review, evidence, journal adaptation, and method-safety support for economics, management, finance, accounting, marketing, information systems, public administration, and related business-school papers. Routes by discipline, subfield, language, method, outlet, section, and task mode while preserving…
analysis-state-management
Use whenever an analysis phase, decision log, artifact registry, run record, or subagent handoff needs to be created, updated, resumed, or compacted. Replaces the old habit of growing and rereading one long plan file with a small docs/analysis/ YAML index and task-specific records. Use at phase boundaries…
did-causal
Use this Skill when the user needs to estimate causal treatment effects using difference-in-differences (DID) designs: two-way fixed effects (TWFE) regression, parallel trends pre-testing, Callaway-Sant'Anna staggered adoption estimator, and Goodman-Bacon decomposition. Covers both Python (linearmodels) and R (did…