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/sapientpants/deepsource-mcp-server/analyze-buildgit clone --depth 1 https://github.com/sapientpants/deepsource-mcp-serverWrote 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/commands/sapientpants/deepsource-mcp-server/analyze-build)<a href="https://agentmods.dev/commands/sapientpants/deepsource-mcp-server/analyze-build"><img src="https://agentmods.dev/badge/commands/sapientpants/deepsource-mcp-server/analyze-build.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00000 | $0.01956 |
| Opus 5 | $0.00000 | $0.00978 |
| Sonnet 5 | $0.00000 | $0.00391 |
| Haiku 4.5 | $0.00000 | $0.00196 |
Grade A, and why
analyze-build 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 4d 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 — 378 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze GitHub Actions Build
Analyzes a GitHub Actions build to identify failures and their root causes. By default, examines the latest build on the main branch, but you can specify a different run.
Usage
/analyze-build [options]
Options
--run-id <id>: Analyze a specific workflow run by ID--branch <name>: Analyze the latest run from a specific branch (default: main)--workflow <name>: Specify which workflow to analyze (default: checks all)--pr <number>: Analyze the latest run for a specific PR
Process
-
Identify Target Build
- Default: Latest workflow run on main branch
- Or use provided run ID, branch, PR, or workflow name
-
Gather Build Information
- Workflow run status and conclusion
- Failed jobs and steps
- Error logs and annotations
- Timing information
- Related commits and PRs
-
Analyze Failures
- Parse error messages and stack traces
- Identify failure patterns
- Categorize error types
- Determine root causes
- Check for flaky test indicators
-
Generate Report
- Executive summary
- Detailed failure analysis
- Root cause identification
- Suggested fixes
- Historical context (if available)
Analysis Categories
1. Test Failures
- Unit test failures
- Integration test failures
- E2E test failures
- Flaky tests
- Timeout issues
2. Build Errors
- Compilation errors
- TypeScript errors
- Dependency resolution issues
- Missing dependencies
- Version conflicts
3. Linting/Formatting
- ESLint violations
- Prettier formatting issues
- Commit message format
- Markdown linting
- YAML validation
4. Infrastructure Issues
- Runner problems
- Network failures
- API rate limits
- Token/permission issues
- Resource exhaustion
5. Deployment Failures
- Docker build issues
- Registry push failures
- Security scan violations
- Release creation problems
Implementation Steps
# 1. Get the target workflow run
echo "🔍 Identifying target build..."
# Default: latest run on main
if [ -z "$RUN_ID" ]; then
if [ -n "$PR_NUMBER" ]; then
# Get latest run for PR
RUN_ID=$(gh pr checks $PR_NUMBER --json statusCheckRollup --jq '.statusCheckRollup[0].workflowRun.databaseId')
elif [ -n "$WORKFLOW_NAME" ]; then
# Get latest run for specific workflow
RUN_ID=$(gh run list --workflow="$WORKFLOW_NAME" --branch="${BRANCH:-main}" --limit=1 --json databaseId --jq '.[0].databaseId')
else
# Get latest run on branch
RUN_ID=$(gh run list --branch="${BRANCH:-main}" --limit=1 --json databaseId --jq '.[0].databaseId')
fi
fi
# 2. Fetch run details
echo "📊 Fetching run details for #$RUN_ID..."
gh run view $RUN_ID --json status,conclusion,name,workflowName,event,headBranch,headSha
# 3. Get failed jobs
echo "❌ Identifying failed jobs..."
gh run view $RUN_ID --json jobs --jq '.jobs[] | select(.conclusion == "failure")'
# 4. Fetch logs for failed jobs
echo "📝 Analyzing failure logs..."
gh run view $RUN_ID --log-failed
# 5. Get annotations (errors/warnings)
echo "📌 Checking annotations..."
gh api /repos/{owner}/{repo}/check-runs --jq '.check_runs[].output.annotations[]'
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.
- 4d ago First seen · 378 lines · 0 tokens per session scan A bf1f508b379b
analyze-build is a command published in the GitHub repository sapientpants/deepsource-mcp-server (7 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,956 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-31.
Other commands, from other repositories
OPSX: Propose
Propose a new change - create it and generate all artifacts in one step.
compile
Compile a FIBER decision context (world + query) and report the oracle verdict, omission accounting, and certificate digest faithfully.
10-optimization-finalization
Comprehensive Optimization: Multi-agent optimization, PRD improvement, documentation consolidation, and production-ready finalization.
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.