agent-skills
AGENTS.md563 starsChanged 9 months agoApache-2.0View on GitHub
A collection of skills for AI agents working with ClickHouse databases and chdb (in-process ClickHouse for Python). Skills are packaged instructions and guidelines that extend agent capabilities for database design, query optimization, operational best practices, and in-process data analytics.
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,843 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 repository15 other files it gives its agents.
- skills/clickhouse-architecture-advisor/AGENTS.mdAGENTS.md
- skills/clickhouse-best-practices/AGENTS.mdAGENTS.md
- skills/clickhouse-js-node-rowbinary/AGENTS.mdAGENTS.md
- skills/clickhouse-managed-postgres-rca/AGENTS.mdAGENTS.md
- chdb-datastoreSkill
- chdb-sqlSkill
- clickhouse-architecture-advisorSkill
- clickhouse-best-practicesSkill
- clickhouse-js-node-codingSkill
- clickhouse-js-node-rowbinarySkill
- clickhouse-js-node-troubleshootingSkill
- clickhouse-managed-postgres-rcaSkill
- clickstack-otel-collectorSkill
- infra-clickhouseSkill
- infra-postgresSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 83
SKILL.md: Always uppercase, always this exact filename
- Very specific: line 130
Use the template in rules/_template.md.
- Very specific: line 176
Add a rule: Create a new .md file in rules/ following the template
- Very specific: line 177
Validate: Run bun run validate to check structure
- Very specific: line 178
Validate code: Run skill-specific validators (e.g., bun run validate-sql)
- Very specific: line 179
Check links: Run bun run check-links
- Very specific: line 180
Build: Run bun run build to generate AGENTS.md
- Distinctive: line 181
Test: Verify the generated documentation is correct
- Distinctive: line 187
Run all validation scripts
- Distinctive: line 195
Keep rules focused and actionable
- Distinctive: line 196
Use real code that can be executed (avoid pseudo-code)
- Distinctive: line 199
Test code examples before committing
- Distinctive: line 200
Follow the existing style and structure
≈ “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
This file provides guidance to AI coding agents (Claude Code, Cursor, Copilot, etc.) when working with code in this repository.
Repository Overview
A collection of skills for AI agents working with ClickHouse databases and chdb (in-process ClickHouse for Python). Skills are packaged instructions and guidelines that extend agent capabilities for database design, query optimization, operational best practices, and in-process data analytics.
Repository Structure
agent-skills/
├── skills/
│ ├── clickhouse-best-practices/ # ClickHouse optimization guidelines
│ │ ├── SKILL.md # Skill definition (overview)
│ │ ├── AGENTS.md # Full compiled guide (generated)
│ │ ├── metadata.json # Version, organization, abstract
│ │ ├── README.md # Maintainer guide
│ │ └── rules/ # Individual rule files
│ │ ├── _sections.md # Section metadata
│ │ ├── _template.md # Template for new rules
│ │ └── *.md # Rule files (e.g., query-use-prewhere.md)
│ ├── chdb-datastore/ # chdb pandas-compatible DataStore API
│ │ ├── SKILL.md # Skill definition and quick-start
│ │ ├── metadata.json # Version, organization, abstract
│ │ ├── README.md # Maintainer guide
│ │ ├── references/ # API reference docs
│ │ │ ├── api-reference.md # DataStore method signatures
│ │ │ └── connectors.md # All data source connection methods
│ │ ├── examples/
│ │ │ └── examples.md # Runnable examples
│ │ └── scripts/
│ │ └── verify_install.py # Environment verification
│ └── chdb-sql/ # chdb SQL API
│ ├── SKILL.md # Skill definition and quick-start
│ ├── metadata.json # Version, organization, abstract
│ ├── README.md # Maintainer guide
│ ├── references/ # SQL reference docs
│ │ ├── api-reference.md # query/Session/connect signatures
│ │ ├── table-functions.md # ClickHouse table functions
│ │ └── sql-functions.md # Commonly used SQL functions
│ ├── examples/
│ │ └── examples.md # Runnable examples
│ └── scripts/
│ └── verify_install.py # Environment verification
├── packages/
│ └── clickhouse-best-practices-build/ # Build tooling
│ ├── package.json # Bun scripts
│ ├── tsconfig.json # TypeScript config
│ └── src/
│ ├── config.ts # Path configuration
│ ├── types.ts # Type definitions
│ ├── parser.ts # Markdown parser
│ ├── build.ts # Build script
│ ├── validate.ts # Rule validator
│ ├── validate-sql.ts # SQL syntax validator
│ └── check-links.ts # Internal link checker
└── .github/
└── workflows/
└── clickhouse-best-practices-ci.yml # CI workflowCreating a New Skill
Directory Structure
skills/
{skill-name}/ # kebab-case directory name
SKILL.md # Required: skill definition
AGENTS.md # Generated: full compiled guide
metadata.json # Required: version, organization, abstract
README.md # Required: maintainer guide
rules/ # Required: rule files
_sections.md # Section metadata
_template.md # Template for new rules
*.md # Individual rulesNaming Conventions
- Skill directory:
kebab-case(e.g.,clickhouse-best-practices) - SKILL.md: Always uppercase, always this exact filename
- Rule files:
{section-prefix}-{descriptive-name}.md(e.g.,query-use-prewhere.md) - Section prefixes: Match the section IDs defined in
_sections.md
SKILL.md Format
---
name: {skill-name}
description: {One sentence describing when to use this skill. Include trigger phrases.}
license: MIT
metadata:
author: {organization}
version: "{version}"
---
# {Skill Title}
{Brief description of what the skill does.}
## When to Apply
Reference these guidelines when:
- {Use case 1}
- {Use case 2}
## Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | {Category} | {Impact} | `{prefix}-` |
## Quick Reference
{Brief overview of each category and key rules}
## How to Use
{Instructions on reading individual rule files}
## Full Compiled Document
For the complete guide with all rules expanded: `AGENTS.md`Rule File Format
Use the template in rules/_template.md. Each rule file must have:
- YAML frontmatter:
--- title: Rule Title impact: CRITICAL | HIGH | MEDIUM-HIGH | MEDIUM | LOW-MEDIUM | LOW impactDescription: Optional (e.g., "10-100× query speedup") tags: skill, category, specific-tags --- - Rule structure:
- Brief explanation of why it matters
- Incorrect: code example showing the anti-pattern
- Correct: code example showing the best practice
- Additional context, trade-offs, or when to apply
- Reference links (optional)
Best Practices for Context Efficiency
Skills are loaded on-demand — only the skill name and description are loaded at startup. The full SKILL.md loads into context only when the agent decides the skill is relevant. To minimize context usage:
- Keep SKILL.md under 500 lines — put detailed reference material in separate files
- Write specific descriptions — helps the agent know exactly when to activate the skill
- Use progressive disclosure — reference supporting files that get read only when needed
- Individual rule files — allows agents to read only relevant rules on-demand
- File references work one level deep — link directly from SKILL.md to supporting files
Build System Requirements
Each skill should have a build package that:
- Validates rule structure and content
- Validates code examples (e.g., SQL syntax for database skills)
- Checks internal links
- Generates the compiled
AGENTS.mdfile
For ClickHouse Best Practices, the build system:
- Uses Bun for fast execution
- Downloads ClickHouse binary for real SQL validation
- Parses markdown with YAML frontmatter
- Generates table of contents and numbered sections
- Supports version management
Development Workflow
- Add a rule: Create a new
.mdfile inrules/following the template - Validate: Run
bun run validateto check structure - Validate code: Run skill-specific validators (e.g.,
bun run validate-sql) - Check links: Run
bun run check-links - Build: Run
bun run buildto generateAGENTS.md - Test: Verify the generated documentation is correct
CI/CD Integration
Set up GitHub Actions (or similar) to:
- Install dependencies
- Run all validation scripts
- Build documentation
- Upload artifacts
See .github/workflows/clickhouse-best-practices-ci.yml for an example.
Contributing Guidelines
- Keep rules focused and actionable
- Use real code that can be executed (avoid pseudo-code)
- Include performance metrics when possible
- Reference official documentation where relevant
- Test code examples before committing
- Follow the existing style and structure
Impact Levels
Choose the appropriate impact level for rules:
- CRITICAL: 10× or more improvement, or prevents serious issues
- HIGH: 2-10× improvement, or significantly impacts scalability
- MEDIUM-HIGH: 25-100% improvement, or important for specific workloads
- MEDIUM: 10-25% improvement, or helpful for maintainability
- LOW-MEDIUM: 5-10% improvement, or nice-to-have optimizations
- LOW: Minor improvements or edge cases
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.

