TerminalSkills/skills

cursor-ai

Build software with Cursor, the AI-powered code editor.

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/TerminalSkills/skills --skill cursor-ai

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

Cursor — AI-First Code Editor

Overview

Cursor is an AI-first code editor built on VS Code. This skill covers the parts you configure in a repository: project rules in .cursor/rules, AGENTS.md, MCP servers in .cursor/mcp.json, and how to prompt Agent for multi-file changes. Cursor renamed its old Composer panel to Agent; the chat that edits files, runs commands and searches the codebase is now simply Agent.

Instructions

Cursor Rules

markdown
<!-- .cursor/rules/general.mdc: project-wide rules. The file starts with the frontmatter block. -->

---
description: General coding standards
alwaysApply: true
---

## Stack
- TypeScript strict mode, no `any`
- Next.js 15 App Router
- Drizzle ORM + PostgreSQL
- Zod for all validation
- Vitest for testing

## Code Style
- Functional, declarative code — no classes
- Early returns over nested conditionals
- Descriptive variable names: `isLoading`, `hasPermission`, `userCount`
- File naming: `kebab-case.ts` for modules, `PascalCase.tsx` for components
- Imports: absolute paths via `@/` alias

## Error Handling
- Return Result types: `{ success: true, data } | { success: false, error }`
- Never throw in business logic
- Use `try/catch` only at API boundaries

## When Generating Tests
- Colocate test files: `module.test.ts` next to `module.ts`
- Use `describe/it` blocks with clear descriptions
- Test behavior, not implementation
- Mock external services, never databases in integration tests
`markdown
<!-- .cursor/rules/react.mdc: auto-attached when a matching file is in context -->

---
globs: src/components/**/*.tsx, src/app/**/*.tsx
alwaysApply: false
---

## Components
- Server Components by default
- `"use client"` only for interactivity (state, effects, event handlers)
- Props interface defined and exported above the component
- Use `cn()` utility for conditional classNames (clsx + tailwind-merge)

## Patterns

// ✅ Correct pattern export interface UserCardProps { user: User; onSelect?: (userId: string) => void; }

export function UserCard({ user, onSelect }: UserCardProps) { return (/ ... /); }

// ❌ Wrong: arrow function export, inline types export const UserCard = ({ user }: { user: any }) => {/ ... /};

Rule files must end in .mdc (a plain .md in .cursor/rules is ignored), and may sit in subfolders. The three frontmatter fields combine like this: alwaysApply: true always includes the rule; globs alone auto-attaches it when a matching file is in context; description alone lets Agent decide; with none of them it applies only when you @-mention it. Multiple globs are separated by commas. A file mentioned in a rule (@service-template.ts) is read by Agent on demand, not pasted in. Type /create-rule in Agent to generate a rule file.

For simple cases, a plain AGENTS.md in the project root works instead of .cursor/rules.

MCP Configuration

Project servers go in .cursor/mcp.json; servers for every project go in ~/.cursor/mcp.json. Transports: stdio (command), SSE and Streamable HTTP (url). Values can use ${env:NAME}, ${workspaceFolder} and ${userHome}; the ${DATABASE_URL} form without env: is not documented.

.cursor/mcp.json:

json
{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": ["tsx", "mcp-servers/database/index.ts"],
      "env": { "DATABASE_URL": "${env:DATABASE_URL}" }
    },
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": { "Authorization": "Bearer ${env:GITHUB_TOKEN}" }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}/src"]
    }
  }
}

Agent (multi-file edits)

markdown
## Prompting Agent effectively
1. Type @ and a file or folder name (@src/middleware.ts, @src/app/api/) to attach exactly the files that matter
2. Other @ mentions: @Terminals (terminal output), @Chats (an earlier conversation), @Commit (working-state diff), @Branch (diff with main), @Browser
3. If you do not know which files matter, skip the mentions: Agent searches the codebase itself
4. Type / to run a skill, or attach a rule by name with @rule-name
5. Agent reads files, edits several at once, runs terminal commands and iterates

Example prompts:

"Refactor the auth middleware in @src/middleware.ts to use the session
validation from @src/lib/auth.ts. Update every route in @src/app/api that
imports the old middleware."

"Create an invoices module following the same patterns as @src/modules/users:
Drizzle schema, API routes, Zod validation and tests."

The older @codebase, @docs and @file mentions are not in the current mentions list; use @ plus a file or folder name instead.

Examples

Example 1: Team rule for API routes

Request: "Make Cursor always validate input with Zod in our Next.js API routes."

Create .cursor/rules/api.mdc:

markdown
---
globs: src/app/api/**/*.ts
alwaysApply: false
---

- Parse every request body with a Zod schema before using it
- Return `{ error: { code, message } }` with a 4xx status on invalid input
- Follow the structure of @src/app/api/users/route.ts

Commit it. When Agent works on a file under src/app/api, the rule is attached; in Customize > Rules it is listed as a project rule of type Apply to Specific Files.

Example 2: Connect a database to Agent

Request: "Let Cursor query our Postgres staging database."

Add the database server from MCP Configuration to .cursor/mcp.json, export DATABASE_URL in the shell that launches Cursor, and make sure the server is enabled under Customize in the sidebar. Use a read-only database role; Agent can then list tables and run queries through the server's tools.

Guidelines

  1. Rules in Git — Commit .cursor/rules/ to the repo; every team member gets the same AI behavior. Keep each rule short and focused; do not paste whole style guides, use a linter for that
  2. Glob targeting — Use specific globs (src/app/api/**/*.ts) for context-specific rules; avoid one giant rules file
  3. MCP for context — Connect databases, APIs, and docs via MCP servers; never put tokens directly in mcp.json, use ${env:NAME}, and give servers least-privilege credentials
  4. Agent for refactors — Use Agent for multi-file changes; it reads, plans, edits, and runs commands
  5. Let Agent search — When you do not know the files involved, describe the task and let Agent find them instead of attaching everything
  6. Tab completion — Enable Cursor Tab for inline completions; learns your coding style over time
  7. Review AI diffs — Always review Cursor's proposed changes before accepting; use the diff view to understand what changed
  8. Rules evolve — Update rules when you find the AI making the same mistake twice; each rule prevents future errors
do mesmo repositório

Mais Skills

Todos os Skills
TerminalSkills
Comunidade

3dsmax-rendering

Scripts and configures production rendering in Autodesk 3ds Max with the V-Ray and Corona renderers: output size and files, render elements, denoising, light mix, batch and command-line rendering, and network rendering. Use when a user asks to set up a production render, render several cameras in one batch, render from the command line or on a render farm, add render passes for compositing, or cut render time for archviz and product shots.

instalações
0
GitHub Stars
180
Atualizado
25 de out.
TerminalSkills
Comunidade

3dsmax-scripting

Covers scripting Autodesk 3ds Max, the 3D modeling and rendering application, with MAXScript and Python (pymxs): scene manipulation, object creation, material assignment, camera and light setup, batch operations, and file I/O. Use when tasks involve automating repetitive 3ds Max workflows, batch processing scenes, running scripts headless with 3dsmaxbatch, creating custom tools, or scripting scene setup for archviz, product visualization, or VFX.

instalações
0
GitHub Stars
180
Atualizado
25 de out.
TerminalSkills
Comunidade

3proxy

3proxy is a small open-source proxy server that runs HTTP/HTTPS, SOCKS4/5, SNI and TCP/UDP port-mapping proxies from one config file. Use when a user asks to set up an HTTP or SOCKS5 proxy, add proxy users and passwords, write 3proxy access rules, chain or rotate upstream (parent) proxies, limit bandwidth, connections or monthly traffic per user, run 3proxy in Docker, or fix a 3proxy.cfg that will not start.

instalações
0
GitHub Stars
180
Atualizado
25 de out.
TerminalSkills
Comunidade

a2a-protocol

Builds Agent2Agent (A2A) servers and clients, the open protocol (originally from Google, now under the Linux Foundation) that lets AI agents from different frameworks call each other. Use when the user wants to create an A2A-compliant agent, build an Agent Card, implement task management, connect agents across frameworks, set up agent discovery, handle streaming responses, implement push notifications, or orchestrate multi-agent workflows. Trigger words: a2a, agent to agent, agent2agent, a2a pro

instalações
0
GitHub Stars
180
Atualizado
25 de out.