원클릭으로
analyze-codebase
Analyze a component's codebase to understand its logging, metrics, and infrastructure for ops agent creation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze a component's codebase to understand its logging, metrics, and infrastructure for ops agent creation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate a deepagents-based operational agent project from templates and design document
Run AST guard validation on a generated agent project and auto-fix violations
Create a standardized operational agent for a component — orchestrates the full analyze → design → generate → validate workflow
Design an operational agent based on codebase analysis, determining tools, config, and system prompt content
| name | analyze-codebase |
| description | Analyze a component's codebase to understand its logging, metrics, and infrastructure for ops agent creation |
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"