Claude-skill-registry agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/core/agent-ops-state" ~/.claude/skills/majiayu000-claude-skill-registry-agent-ops-state-392333 && rm -rf "$T"
manifest:
skills/core/agent-ops-state/SKILL.mdsource content
AgentOps State Discipline
Works with or without
CLI installed. State management uses direct file operations by default.aoc
State File Operations (Default)
All state files are managed via direct file operations:
| File | Operations |
|---|---|
| Read/write directly |
| Read/write directly |
| Read/write directly |
| Read/write directly |
| Read/append/edit directly |
Issue Management (File-Based)
| Operation | How to Do It |
|---|---|
| List issues by priority | Read directly |
| Show issue details | Search for issue ID in priority files |
| Create issue | Append to appropriate file |
| Update issue status | Edit field directly in file |
| Close issue | Set + move to |
| Get summary | Count issues across priority files |
Git Status
# Check current branch git branch --show-current # Check for uncommitted changes git status --porcelain # Get last commit hash git rev-parse --short HEAD
CLI Integration (when aoc is available)
When
aoc CLI is detected in .agent/tools.json, these commands provide convenience shortcuts:
| Operation | CLI Command |
|---|---|
| List issues by priority | |
| Show issue details | |
| Create issue | |
| Update issue status | |
| Close issue | |
| Get summary | |
Note: CLI is optional — all operations can be performed via direct file editing.
When to Use
- At the start of a session/response
- After any meaningful step (analysis/plan decision/implementation/test run)
- When adding/updating issues
- Before concluding a response
Session Start
At session start:
- Check for staleness: Delegate to
stale detectionagent-ops-git - Read state files in order (see below)
- Validate issue dependencies before starting work
Required Reads (in this order)
.agent/constitution.md.agent/focus.md.agent/memory.md
(compact issue summary — read this FIRST for issue overview).agent/issues/index.md
and.agent/issues/critical.md
(only if working on critical).agent/issues/critical-*.md
and.agent/issues/high.md
(only if working on high).agent/issues/high-*.md
and.agent/issues/medium.md
(only if needed).agent/issues/medium-*.md
and.agent/issues/low.md
(only if needed).agent/issues/low-*.md
(if present).agent/baseline.md
Context Optimization: Read
index.md first to understand the issue landscape. Only read full priority files when actively working on an issue from that priority level.
Note on split files: Issue files may be split when they exceed 100K. Always scan for
{priority}-*.md files (e.g., backlog-1.md, history-2.md). Oldest issues are in numbered files, newest in the main file.
Required Updates
.agent/focus.md
.agent/focus.mdMust always contain:
- Session info (last_updated timestamp, branch, last_commit)
- Just did (what changed since last update)
- Doing now (current objective + issue ID if working on one)
- Next (single best next step + prerequisites/unknowns)
.agent/issues/{priority}.md
.agent/issues/{priority}.md- Issues stored by priority: critical.md, high.md, medium.md, low.md
- Only use the repo issue format (see template)
- Create issues for follow-ups, blockers, open questions, approvals needed
- Validate
before starting an issuedepends_on
.agent/memory.md
.agent/memory.md- Only store durable learnings (workflow rules, stable conventions)
- Do not duplicate constitution content
Dependency Validation
Before starting an issue:
- Read issue's
fielddepends_on - Search all priority files for dependency issues
- Check each dependency's status
- If any dependency is not
: mark issue asdone
, note whichblocked - Only proceed if all dependencies satisfied