Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Audit Context Building

ASecurity

Systematically build comprehensive understanding of a protocol before code-level analysis. Use when starting a new audit engagement, mapping trust boundaries and external dependencies, or when needing to identify all privileged roles and protocol invariants before manual review.

61 stars
0 votes
0 copies
0 views
Added 9/19/2026
code-qualityrustgocode-reviewdocumentation

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add 0x-Shashi/WEB3-AUDIT-SKILLS --skill audit-context-building --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Context Building?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Audit Context Building
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0x-shashi-audit-context-building/badge)](https://www.skillsdirectory.com/skills/0x-shashi-audit-context-building)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
id: audit-context-building
title: Audit Context Building Skill
category: methodology
difficulty: beginner
triggers:
  - audit context
  - protocol overview
  - architecture mapping
  - pre-audit
  - start audit
  - understand protocol
related_skills:
  - methodology/SKILL.md
  - solidity-scanner/SKILL.md
tags:
  - context
  - architecture
  - pre-audit
  - methodology
last_updated: 2026-02-26
description: >-
  Systematically build comprehensive understanding of a protocol before
  code-level analysis. Use when starting a new audit engagement, mapping
  trust boundaries and external dependencies, or when needing to identify
  all privileged roles and protocol invariants before manual review.
---

# Audit Context Building Skill

Systematically build comprehensive understanding of a protocol before diving into code-level analysis. Rushing into code without context leads to missed vulnerabilities, wasted time, and incomplete coverage.

---

## Why Context Building Matters

| Without Context | With Context |
|-----------------|-------------|
| Miss cross-contract interactions | Map all trust boundaries before reading code |
| Spend time on low-risk functions | Prioritize functions handling value |
| Overlook admin-only backdoors | Know every privileged role and its power |
| Miss assumptions about external protocols | Document all external dependencies upfront |
| Can't identify broken invariants | Invariants identified before code review |

### Time Allocation

For a typical DeFi protocol audit:

| Phase | Time % | Activity |
|-------|--------|----------|
| Context building | 15-20% | Architecture mapping, docs review, invariants |
| Function-level analysis | 40-50% | Line-by-line code review with context |
| Cross-cutting concerns | 20-25% | Reentrancy, access control, value flows |
| Reporting | 10-15% | Writing findings, severity classification |

---

## Capabilities

### Architecture Mapping
- Contract inventory with purpose and SLOC
- Inheritance hierarchy (is-a relationships)
- Contract interaction graph (calls-to relationships)
- Proxy/upgrade pattern identification
- Library usage and dependency versions

### Function-Level Analysis
- Access control classification (unrestricted / role-gated / owner-only)
- State change documentation (reads vs writes)
- External call mapping (call targets, data flow, return handling)
- CEI pattern compliance per function
- Edge case identification

### Protocol Understanding
- Protocol invariant identification and documentation
- Trust boundary mapping (what trusts what)
- Token and value flow tracing
- Fee mechanism analysis
- Integration point documentation

### Risk Surface Identification
- Centralization risk assessment (admin power)
- Oracle dependency risk
- External protocol dependency risk
- Upgrade mechanism risk
- Economic design risk areas

---

## When to Use

| Trigger | Action |
|---------|--------|
| Starting a new audit | Full pre-audit context workflow |
| Reviewing unfamiliar protocol type | Architecture analysis first |
| Auditing upgradeable contracts | Storage layout + proxy analysis |
| Multi-contract system | Contract interaction mapping |
| Post-deployment review | Focus on live state + deployed config |

---

## Workflows
- [Pre-Audit Context](workflows/pre-audit-context.md) — Complete before code review
- [Architecture Analysis](workflows/architecture-analysis.md) — Contract relationships and structure
- [Deep Code Review](workflows/deep-code-review.md) — Function-by-function analysis

## Resources
- [Completeness Checklist](resources/completeness-checklist.md) — Ensure nothing is missed
- [Function Analysis Example](resources/function-analysis-example.md) — Template with real example
- [Output Template](resources/output-template.md) — Standardized context report format

Attribution

0x-Shashi0x-Shashi
View sourceMore from 0x-Shashi →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman Review

Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.

1023331 votes

Caveman Commit

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

1023331 votes

Verification Loop

一个全面的 Claude Code 会话验证系统。

2456590 votes

Springboot Verification

Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

2456590 votes

Django Verification

Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

2456590 votes
View all in code-quality →