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 skills add simbajigege/book2skills --skill harness-step3-session-managementgit clone --depth 1 https://github.com/simbajigege/book2skillsWrote 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/simbajigege/book2skills/harness-step3-session-management)<a href="https://agentmods.dev/skills/simbajigege/book2skills/harness-step3-session-management"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/harness-step3-session-management/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/skills/simbajigege/book2skills/harness-step3-session-management"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/harness-step3-session-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00149 | $0.02627 |
| Opus 5 | $0.00075 | $0.01314 |
| Sonnet 5 | $0.00030 | $0.00525 |
| Haiku 4.5 | $0.00015 | $0.00263 |
Grade A, and why
harness-step3-session-management 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 12d 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 — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harness Step 3: 建立跨 Session 状态管理
目标
创建三个文件,让 agent 在任何新 session 开始时能在 30 秒内恢复工作状态:
init.sh:环境初始化脚本,验证项目可以正常启动tasks.json:当前任务清单,agent 的工作指令来源progress.md:人类可读的进度摘要,记录每次 session 的关键信息
核心原则:状态靠文件传递,不靠 agent 的记忆。git log 是主记录,这三个文件是辅助。
执行步骤
Step 1:扫描项目启动方式
在写 init.sh 之前,先确认项目如何启动和测试:
# 读 package.json 的 scripts(Node.js 项目)
cat package.json 2>/dev/null | grep -A 20 '"scripts"'
# 或读 Makefile(多语言项目)
cat Makefile 2>/dev/null | head -40
# 或读 pyproject.toml(Python 项目)
cat pyproject.toml 2>/dev/null | grep -A 20 '\[tool.poetry.scripts\]'
# 确认现有 AGENTS.md 里的启动命令
grep -A 5 '启动命令\|start\|dev\|run' AGENTS.md 2>/dev/null
收集:
- 开发服务器启动命令
- 测试命令
- 类型检查/lint 命令(如果有)
- 有没有需要先跑的初始化步骤(如数据库迁移)
Step 2:创建 init.sh
init.sh 的作用:每次 session 开始时运行,快速验证环境是否正常,不正常就立即修复再继续。
#!/bin/bash
# init.sh — 每次 session 开始时运行
# 验证开发环境处于可工作状态
set -e # 任何步骤失败就停止
echo "=== 检查环境 ==="
# 1. 确认在正确目录
echo "工作目录: $(pwd)"
# 2. 安装依赖(如果 node_modules 不存在)
# [根据技术栈选择,以下是示例]
# Node.js:
if [ ! -d "node_modules" ]; then
echo "安装依赖..."
npm install
fi
# 3. 冒烟测试:验证项目能正常启动
# [根据项目实际情况写,目标是用最快的方式验证基本功能正常]
# 示例:跑一个最快的测试
# npm run test -- --testPathPattern=smoke 2>/dev/null || echo "警告:冒烟测试失败,请先修复"
echo "=== 环境检查完成,可以开始工作 ==="
echo "提示:运行 'git log --oneline -10' 查看最近工作历史"
写作要求:
- 根据扫描到的实际启动命令填写,不要留示例注释
- 冒烟测试要快(< 30秒),目的是快速发现环境问题,不是跑完整测试套件
- 如果项目有数据库,加一步检查数据库连接是否正常
- 写完后实际运行一遍,确认脚本无报错:
bash init.sh
Step 3:创建 tasks.json
结构设计:
{
"project": "[项目名]",
"last_updated": "[今天日期,格式 YYYY-MM-DD]",
"current_focus": "[当前最重要的一件事,一句话]",
"tasks": [
{
"id": "[模块缩写]-[序号]",
"title": "[任务标题]",
"description": "[具体做什么,1-3句话]",
"status": "pending | in_progress | done | blocked",
"priority": "high | medium | low",
"blocked_by": "[阻塞原因,仅 blocked 状态时填写]",
"verify": "[如何验证这个任务完成了]",
"requires_eval": false
}
]
}
字段说明(每次新增任务时必须逐字段填写,不能省略):
| 字段 | 是否必填 | 说明 |
|---|---|---|
id |
必填 | 模块缩写 + 序号,如 auth-01、ui-03,简短可读 |
title |
必填 | 任务标题,一句话 |
description |
必填 | 具体做什么,1-3 句话 |
status |
必填 | 初始值为 pending,由 agent 工作时更新 |
priority |
必填 | high / medium / low |
blocked_by |
仅 blocked 时填 | 阻塞原因 |
verify |
必填 | 如何验证完成,必须是可执行的步骤(命令或操作) |
requires_eval |
必填 | 是否需要独立 Evaluator 评审,默认 false,见判断标准 |
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 273 lines · 149 tokens per session scan A cf3e2773bee2
harness-step3-session-management is a skill published in the GitHub repository simbajigege/book2skills (163 stars, last pushed 17d ago), licensed MIT. It adds 149 tokens to every session and 2,627 once invoked, about $0.0007 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
loki-mode
Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention.…
crewai-multi-agent
Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies…
langchain
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…
jira
Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues, check sprint status, or manage their Jira workflow. Triggers on keywords like "jira", "issue", "ticket", "sprint", "backlog", or issue key patterns.
memory-search
Search conversation history and semantic memory to recall previous discussions, decisions, and context. Use when the user asks to "search memory", "what did we discuss", "remember when", "find previous conversation", "check history", or before starting work to recall prior decisions.
agent-memory-mcp
A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).