freephdlabor: Command for Claude Code

.claude/commands/analyze_agent_context.md

analyze_agent_context is a command for Claude Code from ltjed/freephdlabor. It costs 0 tokens per session (1,166 once invoked), scanned A, original, MIT.

A command for checking whether a named software agent has enough instructions, tools, and context to complete its task.

In plain words
What is it for?
Use it to review the manager, ideation, experimentation, or writeup agent and examine its instructions, available tools, and experiment results.
Why use it?
It helps reveal missing information or unclear instructions before an agent starts work. If no results folder is supplied, it can run a new multi-agent experiment to inspect.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is ltjed/freephdlabor's own configuration. It tells Claude Code how to work on freephdlabor itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything freephdlabor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ltjed/freephdlabor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ltjed/freephdlabor/main/.claude/commands/analyze_agent_context.md
Clone the repo
git clone --depth 1 https://github.com/ltjed/freephdlabor

Made for: Claude Code.

Wrote 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.

agentmods badge for analyze_agent_context

README.md
[![agentmods](https://agentmods.dev/badge/commands/ltjed/freephdlabor/analyze_agent_context/github.svg)](https://agentmods.dev/commands/ltjed/freephdlabor/analyze_agent_context)
Your own site
<a href="https://agentmods.dev/commands/ltjed/freephdlabor/analyze_agent_context"><img src="https://agentmods.dev/badge/commands/ltjed/freephdlabor/analyze_agent_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.

agentmods 80×15 button for analyze_agent_context

Your own site · 80×15
<a href="https://agentmods.dev/commands/ltjed/freephdlabor/analyze_agent_context"><img src="https://agentmods.dev/badge/commands/ltjed/freephdlabor/analyze_agent_context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,166 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01166
Opus 5.5 $0.00000 $0.00466
Sonnet 5.5 $0.00000 $0.00233
Haiku 4.5 $0.00000 $0.00117

Measured 2mo ago against content hash 304e8bdd90de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyze_agent_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 2mo 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.

.claude/commands/analyze_agent_context.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are tasked with analyzing agent instructions from the agent's perspective to evaluate whether they have sufficient information, context, and clarity to successfully perform requested tasks.

Arguments provided: $ARGUMENTS

The arguments should contain:

  1. agent_name (required): The specific agent to analyze (manager, ideation, experimentation, or writeup)
  2. results_dir (optional): A specific results directory to analyze (e.g., "20250715_152703_adaptive_lr_cnn"). If not specified, run a new experiment first.

Your workflow:

Step 1: Determine Starting Point

  • If a results_dir is provided, skip to Step 2 with that directory
  • Otherwise, run the multi-agent system:
eval "$(conda shell.bash hook)" && conda activate freephdlabor && export $(cat .env | grep -v '^#' | xargs) && python launch_multiagent.py --model gpt-5.5 2>&1 | tee logs/output_$(date +%Y%m%d_%H%M%S).log

Step 2: Load Agent Instructions and Context

  • Read the current instructions for the specified agent: freephdlabor/prompts/{agent_name}_instructions.py
  • Review the agent's available tools in: freephdlabor/agents/{agent_name}_agent.py
  • Understand the agent's role within the multi-agent system

Step 3: Analyze Agent Task Reception Points

  • Read the JSONL file at results/{results_dir}/agent_llm_calls.jsonl
  • Critical: Find all occurrences when the specified agent first receives a new task from other agents
  • Since agent_llm_calls.jsonl is organized in temporal order, identify when the agent is initially invoked by another agent
  • For each task reception point, extract:
    • The exact task/instruction given to the agent
    • The context provided by the requesting agent
    • The agent's initial response and understanding
    • Any clarification requests or confusion indicators

Step 4: Perspective Analysis for Each Task Reception

For each identified task reception point, put yourself in the agent's shoes and evaluate:

Information Sufficiency at Task Reception:

  • Did the agent receive enough context to understand what was being asked?
  • Was the task scope and boundaries clearly communicated?
  • Did the agent have sufficient background information about the project/experiment?
  • Were dependencies and prerequisites clearly stated?

Read the full file on GitHub · 99 lines

Changes

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.

  1. 2mo ago First seen · 99 lines · 0 tokens per session scan A 304e8bdd90de

Subscribe to this mod's changes

analyze_agent_context is a command published in the GitHub repository ltjed/freephdlabor (718 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,166 tokens. 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.

Related

analyze_agent_context compared with commands from other repositories

analyze_agent_context next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyze_agent_contextltjed/freephdlaborCommand7182mo agoMITA0Claude Code
orchestrateruvnet/rufloCommand81kyesterdayMITA0Claude Code
fest-showObedience-Corp/festivalCommand1232d agoApache-2.0A17Claude Code
performance-bottlenecksruvnet/rufloCommand81kyesterdayMITA0Claude Code
reviewdork-labs/dorkosCommand11yesterdayMITA21Claude Code
typesdork-labs/dorkosCommand11yesterdayMITA13Claude Code
tidyOdinMB/ops-workflowCommand610d agoMITA33Claude Code