From build-my-agent
Analyze a component's codebase to understand its logging, metrics, and infrastructure for ops agent creation
How this skill is triggered — by the user, by Claude, or both
Slash command
/build-my-agent:01-analyze-codebaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping a component owner create an operational agent. This skill guides you through analyzing their codebase.
You are helping a component owner create an operational agent. This skill guides you through analyzing their codebase.
Ask the owner:
"Which component repository should I analyze? Please provide the path or let me know which directory to look at."
Read the repository's README, main entry point, and project config (go.mod, pom.xml, package.json, etc.) to understand what the component does.
Search the codebase for logging patterns:
For Go: Look for log., zap., logrus., slog., zerolog imports and usage
For Java: Look for slf4j, log4j, logback, java.util.logging imports
For Python: Look for logging, structlog, loguru imports
For any language: Look for log configuration files, structured logging patterns
Ask the owner to confirm:
"I found that your component uses [logger library] with [format]. Logs appear to be sent to [destination]. Is this correct? Also:
- What OpenSearch index pattern do your logs end up in? (e.g.,
component-name-*)- Are there any custom fields in your logs that are important for debugging? (e.g.,
trace_id,user_id,order_id)"
Search for metrics/monitoring patterns:
For Go: Look for prometheus package, promhttp, metric registration (NewCounter, NewGauge, NewHistogram)
For Java: Look for micrometer, prometheus client, @Timed, @Counted annotations
For any language: Look for /metrics endpoint, Prometheus scrape config
Ask the owner to confirm:
"I found these metrics being exported:
[list of metrics found]
- What Prometheus namespace/prefix do these use?
- What's the Prometheus endpoint URL your team uses?
- Are there specific metric queries you regularly check when debugging?"
Search for:
Ask the owner:
"I found these infrastructure dependencies:
[list of dependencies]
- Which of these are critical for operations monitoring?
- Are there any dependencies I missed?
- For each critical dependency, what would you want the ops agent to be able to check?"
Ask the owner:
"What are the most common incidents or issues you deal with for this component?
- What's the first thing you check when something goes wrong?
- Are there specific log queries or metric dashboards you always look at?
- What are the typical root causes you've seen?"
Create a structured analysis document at <component>-analysis.md in the working directory:
```markdown
# [component_name] Analysis
## Component Overview
- **Name:** [name]
- **Language:** [language]
- **Purpose:** [what it does]
## Logging
- **Library:** [logger]
- **Format:** [structured/text]
- **Transport:** [how logs get to OpenSearch]
- **OpenSearch Index:** [index_pattern]
- **Key Fields:** [important fields for debugging]
## Metrics
- **Library:** [metrics library]
- **Namespace:** [prometheus namespace]
- **Endpoint:** [prometheus URL]
- **Key Metrics:**
- [metric 1]: [what it measures]
- [metric 2]: [what it measures]
## Infrastructure Dependencies
- [dependency 1]: [what, why it matters]
- [dependency 2]: [what, why it matters]
## Failure Patterns
- [pattern 1]: [symptoms, usual cause, what to check]
- [pattern 2]: [symptoms, usual cause, what to check]
## Recommended Tools
- `log_search` (OpenSearch) — required
- `metric_query` (Prometheus) — required
- [additional tools based on dependencies]
```
After creating the document, tell the owner:
"Analysis complete. I've documented the findings in
[component]-analysis.md. Please review it, then we'll move on to designing the agent. Run the next skill with: 02-design-agent"
npx claudepluginhub namhaesusan/build-my-agent --plugin build-my-agentObservability reconnaissance — inventory what monitoring exists, map coverage, highlight blind spots. Use when asked "what monitoring exists", "observability assessment", or "what can we see".
Inventories observability tools like Prometheus, Grafana, Datadog, OpenTelemetry, Sentry; maps metrics, tracing, logging, alerting coverage across services and highlights blind spots.
Audits code for observability gaps like leftover debug logs, unlogged errors, missing log context, and untracked slow operations using existing tooling.