cloud-devops-expert
Cloud and DevOps expert including AWS, GCP, Azure, and Terraform
audit-context-building
Ultra-granular code analysis for deep architectural context building. Line-by-line and block-by-block analysis using First Principles, 5 Whys, 5 Hows methodology at micro scale. Builds mental models, tracks invariants and assumptions, and maps cross-function call flows for security audit preparat...
Full skill instructions
This skill implements Trail of Bits' audit context building methodology for the agent-studio framework. The core principle is: never form conclusions about code without reading it line by line first. This skill systematically builds understanding from the ground up, tracking every assumption, invariant, and data flow explicitly.
Source repository: https://github.com/trailofbits/skills
License: CC-BY-SA-4.0
Methodology: First Principles + 5 Whys + 5 Hows at micro scale
[UNVERIFIED] and track it until confirmed or disproven.Goal: Map the surface area before diving deep.
## Reconnaissance Report
### Entry Points
- [ ] `path/to/file.ts:42` - HTTP handler `POST /api/login`
- [ ] `path/to/file.ts:89` - HTTP handler `GET /api/users/:id`
### Trust Boundaries
- [ ] External input at: [list locations]
- [ ] Privilege escalation at: [list locations]
- [ ] Serialization/deserialization at: [list locations]
### Data Stores
- [ ] Database: [type, access patterns]
- [ ] File system: [paths, permissions]
- [ ] Environment: [variables accessed]
Goal: Build precise mental model of each critical code path.
For each function/method under analysis:
### Function: `authenticateUser(req, res)` at `src/auth.ts:45-92`
#### Line-by-Line Notes
- L45-48: Extracts `email` and `password` from `req.body`. **Assumption**: body is parsed JSON. **Verified**: Yes, middleware at `app.ts:12`.
- L50: Queries DB for user by email. **Assumption**: email is sanitized. **Verified**: No -- raw string interpolation. **FINDING: SQL injection risk**.
- L55-60: Compares password hash. Uses `bcrypt.compare()`. **OK**: timing-safe comparison.
- L62: Creates JWT token. **Assumption**: secret is strong. **Unverified**: need to check env config.
#### Invariants
- User must exist in DB before authentication succeeds
- Password comparison is timing-safe (bcrypt)
- JWT secret strength is unverified
#### Assumptions (Unverified)
- [ ] Email input is sanitized before DB query
- [ ] JWT secret is cryptographically random
- [ ] Session duration is bounded
#### Call Flow
authenticateUser() → findUserByEmail() → bcrypt.compare() → jwt.sign()
Goal: Trace data and control flow across function boundaries.
### Flow: User Login Input to Database
1. `req.body` (raw JSON) → Express body parser
2. `{ email, password }` (destructured) → `authenticateUser()`
3. `email` (string, UNVALIDATED) → `findUserByEmail(email)` ← RISK
4. `email` → SQL query template literal ← FINDING: injection
5. Result → `user` object (or null)
6. `password` + `user.passwordHash` → `bcrypt.compare()` ← OK
Apply 5 Whys to each finding or anomaly discovered:
### Finding: SQL injection in findUserByEmail
1. **Why** is there SQL injection? → Email is concatenated into query string
2. **Why** is it concatenated? → Developer used template literals instead of parameterized queries
3. **Why** no parameterized query? → The ORM wrapper doesn't enforce parameterization
4. **Why** no input validation? → No validation middleware for this route
5. **Why** no middleware? → Route was added without security review
Apply 5 Hows to verify implementation correctness:
### Verification: JWT Token Generation
1. **How** is the token created? → `jwt.sign(payload, secret, options)`
2. **How** is the secret managed? → `process.env.JWT_SECRET`
3. **How** is the secret rotated? → No rotation mechanism found
4. **How** is token expiry enforced? → `expiresIn: '24h'` in options
5. **How** is token revocation handled? → No revocation mechanism found
The final output is a structured context report:
# Audit Context Report: [Component Name]
## Summary
- Files analyzed: N
- Functions analyzed: N
- Findings: N (Critical: X, High: Y, Medium: Z)
- Unverified assumptions: N
## Mental Model
[High-level description of how the component works, backed by line references]
## Findings
[Each finding with line references, 5 Whys analysis, severity]
## Invariants
[All tracked invariants with verification status]
## Unverified Assumptions
[All assumptions that require further investigation]
## Call Flow Maps
[All traced data/control flows]
## Recommendations
[Prioritized list of actions based on findings]
audit-context-building skill first for deep analysissecurity-architect for threat modelingvariant-analysis skill to find similar patternsstatic-analysis skill for automated confirmation| Skill | Relationship |
|---|---|
security-architect | Consumes context reports for threat modeling |
variant-analysis | Finds pattern variants across codebase |
static-analysis | Automated confirmation of manual findings |
differential-review | Reviews fixes for completeness |
code-analyzer | Provides complexity metrics for prioritization |
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Skipping to conclusions from function names | Names describe intent, not behavior; leads to false findings | Read the code line-by-line before forming conclusions |
| Trusting comments without reading code | Comments are often wrong, stale, or misleading | Treat comments as hypotheses to verify against actual code |
| Skipping error paths in analysis | Security bugs often live in error handlers, not happy paths | Explicitly trace all error branches with equal rigor |
| Analyzing functions before mapping call flows | Misses cross-function trust assumptions and data flow | Map module/call graph in Phase 1 before deep analysis |
| Leaving assumptions untracked | Unverified assumptions silently become false findings | Mark every assumption [UNVERIFIED] until confirmed |
Before starting: Read existing audit context from .claude/context/reports/backend/ for prior analysis of the same codebase area.
During analysis: Write incremental findings to context report file as you discover them. Do not wait until the end.
After completion: Record key findings and methodology notes to .claude/context/memory/learnings.md for future audit sessions.
Cloud and DevOps expert including AWS, GCP, Azure, and Terraform
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
Automated brownfield codebase analysis with weighted keyword scoring, three-stream analysis, and design pattern recognition. Detects project type, frameworks, dependencies, architecture patterns, and generates comprehensive project profile.
Use when creating, updating, or generating README and documentation files for projects and libraries
Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figure...
Comprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance, Material Design 3, and modern Android patterns (MVI, Clean Architecture).
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
Use when the user wants to use Google Gemini for analysis, large files or codebases, sandbox execution, or brainstorming. Uses headless Gemini CLI scripts (no MCP). Triggers on "use Gemini", "analyze with Gemini", "large file", "sandbox", "brainstorm with Gemini".
High-performance toolkit for genomic interval analysis in Rust with Python bindings. Use when working with genomic regions, BED files, coverage tracks, overlap detection, tokenization for ML models, or fragment analysis in computational genomics and machine learning applications.
Defines the structure and implementation of service classes, enforcing the use of interfaces, ServiceImpl classes, DTOs for data transfer, and transactional management.
Diffusion-based molecular docking. Predict protein-ligand binding poses from PDB/SMILES, confidence scores, virtual screening, for structure-based drug design. Not for affinity prediction.
How agents discover and use skills. Use to understand skill invocation protocol.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience