cloak
AGENTS.md8 starsChanged 9 months agoApache-2.0View on GitHub
This file provides context for AI coding agents (Claude Code, Cursor, GitHub Copilot, etc.) working on the CLOAK codebase. For user-facing guidance on using CLOAK with Claude, see CLAUDE.md. CLOAK is an AI-powered cloud security tool for AWS. It integrates with Claude Code/Desktop to provide natural language security assessment capabilities. Tech Stack: - Python 3.11+ - Poetry (package management) - boto3 (AWS SDK) - SQLAlchemy + SQLite (database) - moto (AWS mocking for tests) - pytest (testing) - structlog (logging)
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- aws-ec2Skill
- aws-iamSkill
- aws-lambdaSkill
- aws-s3Skill
- aws-stsSkill
- setup-cloakSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
All techniques extend BaseTechnique from cloak/techniques/base.py:
- Distinctive: line 39
All AWS interactions must use moto mocking
- Very specific: line 41
Use fixtures from tests/conftest.py
- Distinctive: line 75
Use black for formatting
- Distinctive: line 76
Use ruff for linting
- Distinctive: line 77
Follow existing patterns in the codebase
- Distinctive: line 81
When adding new techniques:
- Very specific: line 82
Create implementation in cloak/techniques/{service}/{technique}.py
- Very specific: line 83
Add tests in tests/test_techniques/test_{service}/
- Very specific: line 84
Create skill docs in .claude/skills/{service}/techniques/
- Very specific: line 85
Update SKILL.md technique table
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md - AI Development Context
This file provides context for AI coding agents (Claude Code, Cursor, GitHub Copilot, etc.) working on the CLOAK codebase. For user-facing guidance on using CLOAK with Claude, see CLAUDE.md.
Project Overview
CLOAK is an AI-powered cloud security tool for AWS. It integrates with Claude Code/Desktop to provide natural language security assessment capabilities.
Tech Stack:
- Python 3.11+
- Poetry (package management)
- boto3 (AWS SDK)
- SQLAlchemy + SQLite (database)
- moto (AWS mocking for tests)
- pytest (testing)
- structlog (logging)
Code Patterns
Techniques
All techniques extend BaseTechnique from cloak/techniques/base.py:
class MyTechnique(BaseTechnique):
def metadata(self) -> TechniqueMetadata: ...
def validate(self) -> ValidationResult: ...
def dry_run(self) -> DryRunResult: ...
def _execute_impl(self) -> tuple[list[Asset], list[Finding]]: ...
def summarize(self, assets, findings) -> str: ...Critical Security Rule
Summaries must NEVER contain sensitive data (bucket names, ARNs, account IDs, etc.). Full data goes to SQLite; only aggregate counts go to summaries.
Testing
- All AWS interactions must use moto mocking
- Target 15-20 tests per technique
- Use fixtures from
tests/conftest.py
Key Files
| File | Purpose |
cloak/techniques/base.py | BaseTechnique interface |
cloak/core/database.py | Database layer |
cloak/core/registry.py | Technique registry |
cloak/cli/runner.py | CLI entry point |
docs/DEVELOPMENT.md | Technique implementation guide |
Commands
# Development
poetry install
poetry run pytest
poetry run pytest --cov=cloak
poetry run mypy cloak
poetry run ruff check cloak
poetry run black cloak tests
# CLI
poetry run python -m cloak.cli --list-services
poetry run python -m cloak.cli --list-techniques s3
poetry run python -m cloak.cli --technique s3.list_buckets --execute
poetry run python -m cloak.cli --generate-registryCode Style
- Type hints on all functions
- Max line length: 100 characters
- Use black for formatting
- Use ruff for linting
- Follow existing patterns in the codebase
Adding Features
When adding new techniques:
- Create implementation in
cloak/techniques/{service}/{technique}.py - Add tests in
tests/test_techniques/test_{service}/ - Create skill docs in
.claude/skills/{service}/techniques/ - Update SKILL.md technique table
- Regenerate registry:
poetry run python -m cloak.cli --generate-registry
See docs/DEVELOPMENT.md for the complete technique implementation guide.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

