AI Agent Configuration
Defines AI agent skills for code review and enforces pre-push lint, format, and validation checks via mise and git hooks.
What this file does
Defines AI agent skills for code review and enforces pre-push lint, format, and validation checks via mise and git hooks.
When to use it
- You want to add AI agent skills to your repository
- You need automated pre-push validation for Moonbit projects
- You maintain a monorepo with multiple AI coding assistants
- You want to standardise code review instructions across agents
Assumes this stack
AI Agent Configuration
This repository includes AI agent skills to enhance development workflows. The skills are compatible with multiple AI coding assistants.
Supported Agents
- Claude (Anthropic)
- GitHub Copilot
- OpenAI Codex
- Cursor
- Windsurf
- Google Antigravity
Available Skills
Code Reviewer
Location: .github/skills/code-reviewer/
Purpose: Comprehensive code review for pull requests and code changes in the Morphir Moonbit monorepo.
Usage: Reference this skill when you need to review code changes before merging.
Key Features:
- Checks Moonbit code quality and formatting
- Validates package structure and dependencies
- Ensures test coverage and quality
- Verifies build configuration
- Reviews documentation updates
- Identifies security issues
- Validates mise tasks and CI workflows
How to Use
For Developers
When working with an AI coding assistant, you can reference the skills:
Please review my code changes using the code-reviewer skill.
For AI Agents
Skills are located in .github/skills/ and follow the Agent Skills specification (agentskills.io).
Each skill includes:
SKILL.md: Skill definition with metadata and instructions- Additional resources as needed
Agent-Specific Instructions
Different AI agents may load skills differently. Check your agent's documentation for specific instructions on loading skills from this repository.
Agent Instruction Files
For agents that support configuration files in specific locations, symbolic links are provided:
.github/copilot/- GitHub Copilot.cursorrules- Cursor.windsurfrules- Windsurf.claude/- Claude.codex/- OpenAI Codex.antigravity/- Google Antigravity
These files are symbolic links pointing to the shared skill definitions to avoid duplication.
Adding New Skills
To add a new skill:
- Create a new directory in
.github/skills/<skill-name>/ - Add a
SKILL.mdfile following the Agent Skills specification - Update this AGENTS.md file to document the new skill
- Create symbolic links for agent-specific locations if needed
Pre-Push Requirements
⚠️ IMPORTANT: All lint, format, and validation checks MUST pass before pushing to the repository.
Required Checks
Before any git push, the following checks must pass:
-
Linting (
mise run lint)- YAML file validation
- Moonbit code style checks
-
Format Check (
mise run lint:moonbit)- Moonbit code formatting verification
- Ensures code is formatted with
moon fmt
-
Validation (
mise run validate)- Package structure validation
- Configuration file verification
Automated Enforcement
Git hooks are automatically installed when you enter the directory (via mise hooks). You can also manually run:
# Manually trigger hook setup (idempotent)
mise run setup:hooks
This installs a pre-push git hook that:
- Runs all required checks before allowing a push
- Prevents pushing code that fails validation
- Provides clear error messages if checks fail
- Can be bypassed with
git push --no-verify(not recommended)
Manual Verification
You can run all checks manually before pushing:
mise run check
Or run individual checks:
mise run lint # Run linting
mise run format # Auto-format code
mise run validate # Run validation
CI/CD Integration
The same checks run in CI/CD pipelines. Commits that fail these checks will:
- Block PR merges
- Fail CI workflows
- Require fixes before merge approval
Always run checks locally before pushing to avoid CI failures.
Contributing
When adding or modifying skills:
- Follow the Agent Skills specification (agentskills.io)
- Test with multiple agents when possible
- Update documentation
- Keep skills focused and modular
- Ensure all pre-push checks pass
References
What's inside
7 sections covering supported agents, one code-reviewer skill, agent-specific instructions, adding skills, pre-push requirements, and contributing.
Change this for your project
- Replace
finos/morphir-moonbitwith your own repository name - Replace
mise run lint,mise run lint:moonbit,mise run validate,mise run check,mise run format,mise run setup:hookswith your own task commands - Replace
.github/skills/code-reviewer/with your own skill directory path - Replace
morphir-moonbitreferences in skill descriptions with your project name
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Symbolic links from agent-specific config paths to a shared skill definition avoid duplication
- Pre-push hook setup via mise hooks enforces checks without manual installation
Related Documents
dbt Core
Defines a complete dbt project setup with layered architecture, SQL style, Jinja best practices, and CI/CD workflow guidance.
HarmonyOS 主题与样式 - Cursor Rules
Defines HarmonyOS theming rules for dark/light mode, page brightness, and screen-on control with code examples.
Cursor Development Environment
Documents a Docker-based dev container setup with test commands and OpenClaw agent configuration for the ClawDrive project.
Journey from Concept to Code: Transforming Cursor into a Devin-like AI Assistant
Documents the creation of aicode.cursorrules, a set of rules that turns Cursor/Windsurf into a Devin-like AI assistant with automated planning and self-evolution.