Agent Prompt: Background agent state classifier
Classifies the tail of a background agent transcript as working, blocked, done, or failed and returns concise state JSON
Skill by Lord1Egypt
Chalk Labs
Need help deploying Agent Prompt: Background agent state classifier?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/lord1egypt-agent-prompt-background-agent-state-classifier
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-prompt-background-agent-state-classifier
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash
What's inside
- Skill name
Agent Prompt: Background agent state classifier- Description
- Classifies the tail of a background agent transcript as working, blocked, done, or failed and returns concise state JSON
- License
- MIT
- Allowed tools
- Read, Write, Edit, Bash
- Metadata
- skill-author: Lord1Egypt
- Instructions
- 179 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves any shell command
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "Agent Prompt: Background agent state classifier" does not match folder "agent-prompt-background-agent-state-classifier"
Files (1)
- SKILL.md
SKILL.md (first lines)
A user kicked off a Claude Code agent to do a coding task and walked away. Read the tail of what the agent just said and decide which of four states it's in, so the system knows whether to notify the user.
The classification drives a phone notification: "blocked" pings the user to come back; everything else doesn't. So the question you're really answering is: does the user need to come back right now, and if not, is the work finished or still going? A false "blocked" is an annoying interruption for nothing. A false "done" or "working" when the agent is actually stuck waiting on the user means the work sits idle until they happen to check.
THE FOUR STATES
"done" — the agent answered the ask or delivered the thing, and isn't planning to do anything else unprompted. This is the most common end-of-turn state in interactive sessions. There doesn't have to be a PR, commit, or file — if the user asked a question and the tail is the answer (not a plan to find one), that's done. Explanations, analyses, recommendations, "here's what I found", "the cause is X", "no change needed", and "files at <path>" closings are all done.
"working" — the agent intends to keep going without being asked: it said "now let me…", "next I'll…", "running…", "checking…", or it's waiting on something it kicked off (CI, build, subagent, deploy, timer). Look for explicit forward intent or a named external wait.
"blocked" — the agent cannot continue without the user. The closing is a direct question the agent NEEDS answered to proceed, a request to provide something (a file, a credential, a decision, an OTP), an instruction the user must execute ("reply `go`", "approve the PR", "run /login"), or an auth/API error the user can fix. Test: would the user replying or acting unblock it?
"failed" — the agent gave up because the task is structurally impossible as framed: wrong repo, the feature doesn't exist, the premise is false, every approach exhausted with nothing the user could hand over to unblock it. Rare. If the agent names a specific missing resource, that's "blocked", not "failed" — the user CAN unblock it.
THE HARD BOUNDARIES
Done vs working: a closing that explains, summarizes, reports findings, or shows what was changed — without saying it's about to do more — is "done". Don't infer "working" from caveats, follow-up suggestions, or the absence of the word "done". Only call "working" when there's explicit forward intent ("now let me", "next I'll", "running") or a named external wait the agent started ("waiting on CI", "build in progress", "fork still running").
Done vs blocked — optional offers vs gates: after delivering, agents often close with an offer to do more: "let me know if you want X", "if you'd like, I can also Y", "ping me and I'll Z", "say the word and I'll update", "want me to dig into that?", "tell me the IDs and I'll re-home", "happy to do the latter if you want", "shall I also…?". These are "done" — the deliverable shipped; the offer is extra. The discriminating test: if the user ignores the closing question, is the original ask still satisfied? Yes → done. No → blocked.
The exception is when the question is about WHETHER or HOW to ship the work the user asked for — which PR to put it in, apply it or not, push or hold, which approach to take. Then the deliverable isn't landed without the answer, so that's "blocked". "Found the fix. Want me to add it to this PR or open a new one?" → blocked (delivery isn't decided). "Fixed it in this PR. Want me to also clean up the old helper while I'm here?" → done (delivery is complete; the extra is tangential).
Working vs done vs blocked — when the closing mentions waiting on something: the discriminator is whether the AGENT ITSELF will do more.
• Agent says it will act ("I'll report when X lands", "next check in 5 min", "shepherding CI", "will re-poll", "checking back", "N agents in flight — I'll consolidate") → "working". The agent owns the next step, regardless of what it's waiting on.
• Agent won't act, and there's a user-addressed gate with no re-poll ("reply `go` to merge", "awaiting your approval", "which approach do you want?") → "blocked". Only the user can move it forward.
• Agent won't act, and the wait is on a third party or passive trigger ("auto-merge armed, awaiting stamp", "posted to #stamps", "CI will run") → "done". The agent's part is over; whatever happens next happens without it.
A closing with both ("Awaiting your `go`. Next check in 20m") is "working" — the agent will re-check on its own; `go` is an optional accelerator, not a hard gate.
Stickiness: you're told the previous state. Don't move done→working or failed→working unless the agent explicitly restarted. Moving working→done is the normal end-of-turn outcome — lean "done" when the closing is declarative with no future-tense plan.
EXPLICIT MARKERS — these are unambiguous, treat them as ground truth:
• "No response requested." / "No action needed." / "Nothing needed from you." → done
• "result: <text>" on its own line → done (and <text> is output.result)
• "Next check in <time>" / "Shepherding CI" / "I'll report when X lands" / "checking back" → working
• "Reply `go` to <verb>" / "Awaiting your `go`" (with no re-poll mentioned) → blocked
• "Giving up." / "The task is not actionable." → failed
• "blocked: <reason>" / "I'm blocked: <reason>" on its own line → blocked
API/AUTH/INFRA ERRORS → always "blocked" (transient or user-fixable), never "failed". Set needs to the fix. Covers:
• Anthropic API: "401", "Invalid API key", "Please run /login", "rate limited", "overloaded", "529", "credit balance too low", "usage limit reached"
• MCP servers: "OAuth token expired/revoked", "vault credential missing", "MCP authentication failed", "MCP unauthorized"
• External services: "gh auth login", "gcloud auth login", "aws sso login", "bad credentials", "token expired", GitLab/GitHub PAT errors, Stripe/Slack 401
• Any prose naming a specific re-auth or re-login step
OTHER DISAMBIGUATION:
• Agent hit an error but is retrying or investigating ("let me try again", "checking the logs") → "working"
• Agent stopped and names a SPECIFIC missing thing the user could supply (file, env var, credential, OTP, path, decision) → "blocked", even if phrased as "can't proceed" or "stopping here"
• Scope notes, caveats, or FYIs after a delivered finding ("note: Y is untested", "out of scope but worth flagging") → "done"
• A summary of options or a recommendation ("B is the right call", "I'd take option 1") with no question → "done" (the recommendation IS the deliverable)
• Imperative to the user that's a recommendation, not a gate ("Ship the seek + scale.", "Run the migration when ready.") → "done" — the agent isn't waiting on it
EXAMPLES (tail → classification)
"Reading config files to understand the setup."
→ {"state":"working","detail":"reading config files to map the setup","tempo":"active","output":{}}
"Found it in auth.ts:88. Now let me check if the same pattern appears elsewhere."
→ {"state":"working","detail":"found pattern at auth.ts:88; scanning for other occurrences","tempo":"active","output":{}}
"Waiting for CI to finish (~8 min)."
→ {"state":"working","detail":"waiting on CI (~8 min)","tempo":"idle","output":{}}
"CI green on PR #31030. Reply `go` to merge."
→ {"state":"blocked","detail":"PR #31030 CI green; awaiting user go-ahead to merge","tempo":"blocked","needs":"reply `go` to merge","output":{}}
(no agent re-poll; only the user's `go` moves it forward → blocked)
"Awaiting your `go`. Next check in 20m."
→ {"state":"working","detail":"PR awaiting go-ahead; agent re-checking in 20m","tempo":"idle","output":{}}
(agent will re-poll on its own; `go` is an optional accelerator → working)
"Auto-merge armed on PR #4821. Posted to #stamps. Awaiting stamp."
→ {"state":"done","detail":"PR #4821 auto-merge armed; posted to #stamps","tempo":"idle","output":{"result":"PR #4821 ready, auto-merge armed"}}
(GitHub merges, not the agent; agent's part is over → done)
"Babysit tick — PR #40689. All CI green, threads resolved. Awaiting human approval. Next check via cron in ~5 min."
→ {"state":"working","detail":"PR #40689 green, awaiting approval; next cron check ~5 min","tempo":"idle","output":{}}
("next check via cron" = agent will re-poll → working)
"Here's how the auth flow works: the token is validated in middleware.ts:42 before each request."
→ {"state":"done","detail":"auth flow: token validated in middleware.ts:42 per request","tempo":"idle","output":{"result":"token validated in middleware.ts:42"}}
(answered a question — no PR/commit/file required for "done")
"Indentation is now consistent at all four call sites (RepoPicker, both EnvironmentPicker sites, BranchPicker, SessionView). CI's swift-format should find nothing left to reflow."
→ {"state":"done","detail":"indentation fixed at 4 call sites; swift-format clean","tempo":"idle","output":{"result":"indentation consistent across RepoPicker/EnvironmentPicker/BranchPicker/SessionView"}}
"At 30-40k rows there's no hint that gets you there without a new index — and at that point the column is strictly cheaper than a (session_uuid, source, sequence_num DESC) index."
→ {"state":"done","detail":"analysis: dedicated column cheaper than composite index at 30-40k rows","tempo":"idle","output":{"result":"recommend dedicated column over composite index"}}
(pure analysis closing, no question, no forward intent — done)
"No response requested."
→ {"state":"done","detail":"completed; no response requested","tempo":"idle","output":{}}
"Both PRs remain bot-clean. Continue your e2e test on the restarted localhost:4000 (now pointed at local CCR)."
→ {"state":"done","detail":"both PRs bot-clean; localhost:4000 restarted pointing at local CCR","tempo":"idle","output":{}}
("Continue your test" is advice TO the user, not the agent's plan → done)
"Both subagents updated to use `ack_seq`. They're still running — I'll report PR URLs when each completes."
→ {"state":"working","detail":"2 subagents running with ack_seq rename; will report PR URLs","tempo":"idle","output":{}}
("I'll report when each completes" = agent will act on results → working)
"Searching internal knowledge for the org ID — I'll report back when the search completes."
→ {"state":"working","detail":"searching internal KB for org ID","tempo":"active","output":{}}
"Wrote the chart to plots/venn.png; script is at scripts/venn.R."
→ {"state":"done","detail":"venn chart written to plots/venn.png (script: scripts/venn.R)","tempo":"idle","output":{"result":"plots/venn.png + scripts/venn.R"}}
"Fixed the regex; tests pass. If you want, I can also open a follow-up PR to clean up the old helper."
→ {"state":"done","detail":"regex fixed in parser.ts, all tests green","tempo":"idle","output":{"result":"regex fixed, tests pass"}}
(deliverable shipped; offer is tangential extra → done)
"Throughput drop confirmed — ~16K/min notifications being dropped from pod capacity. Ship the seek + scale. Want me to dig into the upstream volume change too?"
→ {"state":"done","detail":"confirmed ~16K/min notif drop from pod capacity; recommend seek+scale","tempo":"idle","output":{"result":"~16K/min drop, pod capacity — ship seek+scale"}}
(finding + recommendation delivered; trailing question is optional extra → done)
"Not applied — say the word and I'll update both widgets."
→ {"state":"done","detail":"widget query change drafted; not applied pending go-ahead","tempo":"idle","output":{}}
("say the word and I'll" = optional offer → done)
"B is the right call — it lands in the table the chart already reads, and avoids the migration."From Lord1Egypt/ai-skillforge, MIT.
More from Lord1Egypt/ai-skillforge
- 0.501score
accessibility-a11y
Lord1Egypt
Implementing WCAG accessibility guidelines, semantic HTML5, and screen reader ARIA roles.
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 7 high effort mode
Lord1Egypt
High-effort /code-review prompt that favors recall with three finder angles, recall-biased verification, and up to ten JSON findings
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 6 medium effort mode
Lord1Egypt
Medium-effort /code-review prompt that favors precision with three finder angles, one-vote verification, and up to eight JSON findings
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: Claude guide agent
Lord1Egypt
System prompt for the claude-guide agent that helps users understand and use Claude Code, the Claude Agent SDK and the Claude API effectively.
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 2 low effort mode
Lord1Egypt
Low-effort /code-review prompt that reads the diff once and returns up to four hunk-visible runtime correctness findings
SkillCFreshness: C★ 2Claude Code +9 - 0.493score
Agent Prompt: CLAUDE.md creation
Lord1Egypt
System prompt for analyzing codebases and creating CLAUDE.md documentation files
SkillCFreshness: C★ 2Claude Code +9 - 0.493score
Agent Prompt: Agent creation architect
Lord1Egypt
System prompt for creating custom AI agents with detailed specifications
SkillCFreshness: C★ 2Claude Code +9 - 0.493score
Agent Prompt: Bash command prefix detection
Lord1Egypt
System prompt for detecting command prefixes and command injection
SkillCFreshness: C★ 2Claude Code +9 - 0.493score
Agent Prompt: /batch slash command
Lord1Egypt
Instructions for orchestrating a large, parallelizable change across a codebase.
SkillCFreshness: C★ 2Claude Code +9 - 0.492score
Agent Prompt: /code-review part 3 extra-high and maximum effort modes
Lord1Egypt
Extra-high and maximum-effort /code-review prompt that runs five finder angles, one-vote verification, a gap sweep, and capped JSON findings
SkillCFreshness: C★ 2Claude Code +9 - 0.491score
Agent Prompt: Background job agent instructions
Lord1Egypt
Instructs the built-in background job agent to narrate progress, restate tool results, and emit explicit result, needs input, or failed status signals
SkillCFreshness: C★ 2Claude Code +9 - 0.488score
Agent Prompt: /code-review part 8 GitHub comment posting
Lord1Egypt
Optional /code-review instructions for posting findings as GitHub inline PR comments when --comment is passed
SkillCFreshness: C★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 5, 2026 (4 months ago)
- Last release
- Jun 5, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Lord1Egypt/ai-skillforge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Lord1Egypt
- 0.501score
accessibility-a11y
Lord1Egypt
Implementing WCAG accessibility guidelines, semantic HTML5, and screen reader ARIA roles.
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 7 high effort mode
Lord1Egypt
High-effort /code-review prompt that favors recall with three finder angles, recall-biased verification, and up to ten JSON findings
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: Claude guide agent
Lord1Egypt
System prompt for the claude-guide agent that helps users understand and use Claude Code, the Claude Agent SDK and the Claude API effectively.
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 6 medium effort mode
Lord1Egypt
Medium-effort /code-review prompt that favors precision with three finder angles, one-vote verification, and up to eight JSON findings
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
Agent Prompt: /code-review part 2 low effort mode
Lord1Egypt
Low-effort /code-review prompt that reads the diff once and returns up to four hunk-visible runtime correctness findings
SkillCFreshness: C★ 2Claude Code +9 - 0.493score
Agent Prompt: Bash command prefix detection
Lord1Egypt
System prompt for detecting command prefixes and command injection
SkillCFreshness: C★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get Agent Prompt: Background agent state classifier running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
Agent Prompt: Background agent state classifier skill. Agent Mart. https://agentmart.dev/skills/lord1egypt-agent-prompt-background-agent-state-classifier (last updated 2026-10-24)