Lewati ke konten
TakoAPI
Kembali ke skill

cursor-agent-configs

oleh DVC2

Cursor
โ€”Belum ada penilaian
Penilaian Anda

Ringkasan

Copy and paste prompts for cursor agent. Free for anyone to use or add to. This repository provides a curated collection of advanced .mdc rules for Cursor IDE to optimize AI agent behavior, memory management, and development workflows.

Deskripsi

# Cursor & Agent Configs

> โš ๏ธ **Archived โ€” no longer maintained (as of June 2026).** This repo is read-only.
> The configs still work and are public domain โ€” copy what's useful. For current, living
> guidance see [agents.md](https://agents.md) and the [Cursor docs](https://cursor.com/docs).
> See [`SUNSET.md`](SUNSET.md) for why, and [`MIGRATION.md`](MIGRATION.md) for the history.

[![CI](https://github.com/DVC2/cursor-agent-configs/workflows/CI/badge.svg)](https://github.com/DVC2/cursor-agent-configs/actions)
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](LICENSE)
[![Cursor](https://img.shields.io/badge/Cursor-2.4%2B-black.svg)](https://cursor.com/docs)

Copy-paste configuration for getting the most out of [Cursor](https://cursor.com) and other
AI coding agents in 2026 โ€” built around the primitives Cursor actually ships today:
**`AGENTS.md`, scoped rules, subagents, Skills, and hooks**.

> **This repo was rebuilt in 2026.** It started in early 2025 as a pile of giant always-on
> `.mdc` rules โ€” an approach that's now an anti-pattern (it burns context and predates
> subagents/Skills/hooks entirely). If you used the old version, see [`MIGRATION.md`](MIGRATION.md).

## The five primitives โ€” and when to use each

| Primitive | Lives in | Use it whenโ€ฆ | Reads cross-tool? |
|---|---|---|---|
| **`AGENTS.md`** | repo root (+ nested) | You want always-on project context: stack, conventions, commands. **Start here.** | โœ… Cursor, Codex, Copilot, Gemini CLI, Aider, Windsurf, Zedโ€ฆ |
| **Rules** (`.mdc`) | `.cursor/rules/` | You need *scoped* guidance โ€” applies only to matching files (`globs`) or when the agent judges it relevant (`description`). | Cursor only |
| **Subagents** | `.cursor/agents/` | A task needs its own isolated context or a specialized persona (review, verify, test) โ€” possibly run in parallel. | Cursor (+ `.claude`/`.codex` dirs) |
| **Skills** | `.cursor/skills/<name>/SKILL.md` | You have an on-demand procedure that should load *only when relevant* (e.g. "write an ADR"), keeping context lean. | Cursor (+ compat dirs) |
| **Hooks** | `.cursor/hooks.json` + `.cursor/hooks/` | You need *deterministic*, non-negotiable behavior around agent actions โ€” format on save, block destructive commands. | Cursor |

Rule of thumb: **`AGENTS.md` first.** Add a scoped rule only when you hit a real scoping
need; reach for a subagent/Skill/hook when the job is delegation, on-demand knowledge, or
hard enforcement respectively.

## What's in here

```
cursor-agent-configs/
โ”œโ”€โ”€ AGENTS.md                       # this repo's own agent context (a worked example)
โ”œโ”€โ”€ templates/
โ”‚   โ”œโ”€โ”€ AGENTS.md                   # generic starter to copy into YOUR project
โ”‚   โ”œโ”€โ”€ nextjs/                     # stack pack: Next.js + TS (AGENTS.md + scoped rule)
โ”‚   โ”œโ”€โ”€ python-uv/                  # stack pack: Python + uv + ruff + pytest
โ”‚   โ””โ”€โ”€ go/                         # stack pack: Go modules + table-driven tests
โ”œโ”€โ”€ .cursor/
โ”‚   โ”œโ”€โ”€ rules/
โ”‚   โ”‚   โ”œโ”€โ”€ javascript.mdc          # short, glob-scoped โ€” defers style to ESLint/Prettier
โ”‚   โ”‚   โ””โ”€โ”€ typescript.mdc          # short, glob-scoped โ€” defers strictness to tsconfig
โ”‚   โ”œโ”€โ”€ agents/
โ”‚   โ”‚   โ”œโ”€โ”€ code-reviewer.md        # read-only diff reviewer with a severity ladder
โ”‚   โ”‚   โ”œโ”€โ”€ verifier.md             # confirms "done" work actually runs
โ”‚   โ”‚   โ””โ”€โ”€ test-author.md          # writes regression-catching tests
โ”‚   โ”œโ”€โ”€ skills/
โ”‚   โ”‚   โ”œโ”€โ”€ debug/                  # systematic debug loop (reproduceโ†’isolateโ†’โ€ฆโ†’verify)
โ”‚   โ”‚   โ”œโ”€โ”€ write-adr/              # ADR template, lifecycle, and when-to-write gate
โ”‚   โ”‚   โ””โ”€โ”€ init-agents-md/         # inspects a repo and drafts a tailored AGENTS.md
โ”‚   โ”œโ”€โ”€ hooks.json
โ”‚   โ””โ”€โ”€ hooks/
โ”‚       โ”œโ”€โ”€ format.sh               # afterFileEdit: format the edited file
โ”‚       โ””โ”€โ”€ guard-destructive.sh    # beforeShellExecution: block rm -rf /, force-push, โ€ฆ
โ”œโ”€โ”€ examples/hooks/                 # hooks cookbook: secret-guard, context-inject, test-on-save
โ”œโ”€โ”€ docs/                           # cheat sheet, cross-tool sync, troubleshooting
โ”œโ”€โ”€ scripts/                        # install.sh / install.ps1 / sync-agents.sh
โ””โ”€โ”€ MIGRATION.md
```

### Also in here

- **Stack starter packs** โ€” [`templates/`](templates/): copy a ready `AGENTS.md` + matching
  scoped rule for Next.js, Python (uv), or Go.
- **One config, every agent** โ€” [`scripts/sync-agents.sh`](scripts/sync-agents.sh) generates
  `CLAUDE.md` / `.github/copilot-instructions.md` / `GEMINI.md` from your `AGENTS.md`. See
  [`docs/cross-tool.md`](docs/cross-tool.md).
- **Hooks cookbook** โ€” [`examples/hooks/`](examples/hooks/): more ready-to-wire hooks (block
  committing secrets, inject git context at session start, run the matching test on save).
- **`/init-agents-md`** โ€” a Skill that inspects your repo and drafts an `AGENTS.md` for you.

## Quick start

**Copy what you want โ€” nothing here requires a build step, Node, or npm.**

```bash
git clone https://github.com/DVC2/cursor-agent-configs.git

# Option A: scripted (interactive, backs up anything it would overwrite)
cd your-project && /path/to/cursor-agent-configs/scripts/install.sh

# Option B: manual โ€” copy only the pieces you want
cp -r cursor-agent-configs/.cursor/agents   your-project/.cursor/
cp -r cursor-agent-configs/.cursor/skills   your-project/.cursor/
cp    cursor-agent-configs/templates/AGENTS.md  your-project/AGENTS.md   # then edit it
```

Then restart Cursor. Rules auto-attach by glob; Skills/subagents load on demand (invoke a
subagent with `/code-reviewer`, a Skill with `/debug`).

> โš ๏ธ **Hooks run shell scripts on agent events.** Read `.cursor/hooks/*.sh` before installing
> them, and only commit hooks your team trusts. They require `jq`.

## Verify it loaded

- Rules: open a `.ts`/`.js` file โ€” the matching rule attaches in the agent's context panel.
- Subagents/Skills: type `/` in Agent and confirm `code-reviewer`, `debug`, etc. appear.
- Hooks: `jq . .cursor/hooks.json` should parse; try a blocked command to see the guard fire.

## Compatibility

Subagents and Skills require **Cursor 2.4+** (nested subagents: 2.5+). `AGENTS.md` and
`.cursor/rules` work broadly. The legacy single-file `.cursorrules` is deprecated โ€” migrate to
`AGENTS.md` + `.cursor/rules`.

## Docs

- [`docs/quick-reference.md`](docs/quick-reference.md) โ€” frontmatter & format cheat sheet for every primitive.
- [`docs/troubleshooting.md`](docs/troubleshooting.md) โ€” "my rule/Skill/hook isn't firing."
- [`CONTRIBUTING.md`](CONTRIBUTING.md) โ€” how to add a config.

## License

[The Unlicense](LICENSE) โ€” public domain. Copy freely.

Instalasi

Pasang skill dari https://github.com/DVC2/cursor-agent-configs

Skill ini belum dipublikasikan di registri ClawHub. Tempel prompt ke coding agent Anda โ€” Claude Code, Cursor, Codex โ€” dan skill-nya akan dipasang langsung dari repositori sumbernya.

Buka repositori

Tautan