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 commands/ltjed/freephdlabor/analyze_agent_contextgit clone --depth 1 https://github.com/ltjed/freephdlaborWhat 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 | $0.00000 | $0.01166 |
| Opus 5 | $0.00000 | $0.00583 |
| Sonnet 5 | $0.00000 | $0.00233 |
| Haiku 4.5 | $0.00000 | $0.00117 |
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 2d 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 — 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:
- agent_name (required): The specific agent to analyze (manager, ideation, experimentation, or writeup)
- 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?
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.
- 2d ago First seen · 99 lines · 0 tokens per session scan A 304e8bdd90de
analyze_agent_context is a command published in the GitHub repository ltjed/freephdlabor (703 stars, last pushed 3mo 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.
Other commands, from other repositories
tool-connector
Connect any tool you use at work — internal company tools, custom-built systems, and commercial tools like Slack, Confluence, Jira, Linear, GitHub, Outlook, Datadog, and PagerDuty.
parallel-task
Executes a structured plan in parallel waves, spawning appropriate agents for each task based on dependencies and confidence routing.
spawn-subagent
Spawns a specialized subagent dynamically for a specific task, enabling flexible team composition based on runtime requirements.
handoff-prompt
Write a self-destructing handoff doc to .temp/ and print a paste-ready prompt that bootstraps a fresh agent with full context.
feature
End-to-end authoring workflow for The Claude Code Bible — verify claims against the real tool, split chapters into path-disjoint slices, draft with parallel agents in this ONE checkout (never worktrees), fix TOC + cross-links, commit by path and merge. Reads intent from the prompt.
workflows
Show open-dynamic-workflows status — active workflows, agents, budget.