agentleFS
openrec0nopenrec0n/cloak/AGENTS.md

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.

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
  1. Very specific:

    All techniques extend BaseTechnique from cloak/techniques/base.py:

    line 22
  2. Distinctive:

    All AWS interactions must use moto mocking

    line 39
  3. Very specific:

    Use fixtures from tests/conftest.py

    line 41
  4. Distinctive:

    Use black for formatting

    line 75
  5. Distinctive:

    Use ruff for linting

    line 76
  6. Distinctive:

    Follow existing patterns in the codebase

    line 77
  7. Distinctive:

    When adding new techniques:

    line 81
  8. Very specific:

    Create implementation in cloak/techniques/{service}/{technique}.py

    line 82
  9. Very specific:

    Add tests in tests/test_techniques/test_{service}/

    line 83
  10. Very specific:

    Create skill docs in .claude/skills/{service}/techniques/

    line 84
  11. Very specific:

    Update SKILL.md technique table

    line 85

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

FilePurpose
cloak/techniques/base.pyBaseTechnique interface
cloak/core/database.pyDatabase layer
cloak/core/registry.pyTechnique registry
cloak/cli/runner.pyCLI entry point
docs/DEVELOPMENT.mdTechnique 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-registry

Code 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:

  1. Create implementation in cloak/techniques/{service}/{technique}.py
  2. Add tests in tests/test_techniques/test_{service}/
  3. Create skill docs in .claude/skills/{service}/techniques/
  4. Update SKILL.md technique table
  5. Regenerate registry: poetry run python -m cloak.cli --generate-registry

See docs/DEVELOPMENT.md for the complete technique implementation guide.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.