Agent skill

Cursor Usage

by trycompai in trycompai/comp

How to write and manage Cursor rules - invoke with @cursor-usage

AGPL-3.0Auto-check passedAgent Workflows

Install Cursor Usage

skills CLI
$ npx skills add trycompai/comp --skill cursor-usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trycompai/comp cursor-usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cursor-usage .claude/skills/cursor-usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cursor-usage
GitHub stars
2k
Token cost
~1.5k tokens
SKILL.md length
592 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
AGPL-3.0

At a glance

How to write and manage Cursor rules - invoke with @cursor-usage

  • Works in 7 steps: Frontmatter (YAML metadata) → Content (Markdown) → Keep Rules Focused → …
  • Tasks that involve Agent instruction files
  • SKILL.md covers Overview, Rule File Structure, How Rules Are Applied and Best Practices for Writing Rules, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cursor Usage is an agent skill from trycompai/comp. How to write and manage Cursor rules - invoke with @cursor-usage

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: AI Native platform to get companies compliant - Vanta & Drata Alternative. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “/cursor-usage”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Frontmatter (YAML metadata)
  2. Content (Markdown)
  3. Keep Rules Focused
  4. Provide Concrete Examples
  5. Use Clear Section Headers
  6. Define Exceptions Explicitly
  7. Include Checklists

What it can do on your machine

Read from SKILL.md and the folder at commit 0117612. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml, markdown, typescript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cursor Usage loads about 1.5k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 592 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trycompai/comp at commit 0117612, republished under its AGPL-3.0 licence (© trycompai). 592 words, ~1,544 tokens.

Download SKILL.mdSave it as .claude/skills/cursor-usage/SKILL.md (or your agent's skills folder).
name
cursor-usage
description
How to write and manage Cursor rules - invoke with @cursor-usage

Source Cursor rule: .cursor/rules/cursor-usage.mdc. Original file scope: .cursor/rules/*.mdc. Original Cursor alwaysApply: false.

Using Cursor Rules

Overview

Cursor rules provide system-level instructions to the AI to maintain code consistency, quality, and adherence to project standards. They are stored in the .cursor/rules/ directory as .mdc (Markdown with frontmatter) files.

Rule File Structure

Each .mdc rule file consists of two parts:

1. Frontmatter (YAML metadata)
yaml
---
description: Brief overview of what this rule enforces
globs: **/*.{ts,tsx}
alwaysApply: true
---

Frontmatter Fields:

  • description: A clear, concise explanation of the rule's purpose
  • globs: Glob pattern to match files where this rule should apply (plain string, no quotes or arrays)
    • Examples:
      • **/*.tsx - All TSX files
      • **/*.{ts,tsx} - All TS and TSX files
      • apps/*/components/**/*.tsx - All TSX files in any app's components directory
      • **/trigger/**/*.ts - All TS files in trigger directories
  • alwaysApply: Boolean indicating if the rule should always be active
    • true: Rule is always active when working on matching files
    • false: Rule can be selectively invoked with @rule-name
2. Content (Markdown)

The body of the rule file contains the actual guidelines, examples, and instructions written in Markdown format.

How Rules Are Applied

Automatic Application

Rules with alwaysApply: true are automatically loaded when:

  • You open a file matching the globs pattern
  • You're working on code that matches the pattern
  • Cursor AI generates or suggests code for matching files
Manual Invocation

You can reference specific rules in your prompts:

@design-system create a new button component

This explicitly tells Cursor to apply the design-system rule.

Best Practices for Writing Rules

1. Keep Rules Focused
  • Each rule file should cover a specific domain (e.g., design system, API patterns, testing)
  • Avoid mixing unrelated concerns in a single rule file
  • Aim for rules under 500 lines for better AI comprehension
2. Provide Concrete Examples

Always include:

  • ✅ Good examples (what TO do)
  • ❌ Bad examples (what NOT to do)
  • Real code snippets from your project
tsx
// ✅ Good: Use semantic tokens
<div className="bg-background text-foreground">Content</div>

// ❌ Bad: Hardcoded colors
<div className="bg-white text-black">Content</div>
3. Use Clear Section Headers

Organize content with descriptive headers:

markdown
## Core Principles

## Rules

## Examples

## Exceptions

## Common Mistakes
4. Define Exceptions Explicitly

If there are cases where rules don't apply, state them clearly:

markdown
## Exceptions

The ONLY time you can pass className to a design system component is for:

1. Width utilities: `w-full`, `max-w-md`
2. Responsive display: `hidden`, `md:block`
5. Include Checklists

Provide actionable checklists for validation:

markdown
## Code Review Checklist

Before committing:

- [ ] Uses semantic color tokens
- [ ] Works in both light and dark mode
- [ ] Fully responsive

Managing Rules

Creating a New Rule
  1. Create a new .mdc file in .cursor/rules/
  2. Add appropriate frontmatter
  3. Write clear guidelines with examples
  4. Test by working on matching files
Show full SKILL.md (240 more words)Show less
Updating Existing Rules
  1. Edit the .mdc file
  2. Rules are automatically reloaded
  3. Test changes with relevant files
Organizing Rules

Recommended structure:

.cursor/rules/
├── design-system.mdc       # Component usage, variants, composition
├── code-standards.mdc      # General code quality rules
├── typescript-rules.mdc    # TypeScript type safety
├── react-code.mdc          # React patterns and conventions
├── data-fetching.mdc       # Server/client data patterns
└── cursor-usage.mdc        # This file - how to use rules

Rule Scope with Globs

Common Glob Patterns
yaml
# All TypeScript/TSX files
globs: **/*.{ts,tsx}

# Only TSX files (React components)
globs: **/*.tsx

# Only trigger task files
globs: **/trigger/**/*.ts

# Prisma schema files
globs: **/*.prisma

# All JSON and TypeScript files
globs: **/*.{ts,tsx,json}
Glob Pattern Tips
  • Use ** for recursive directory matching
  • Use * for single-level wildcard
  • Use {ts,tsx} for multiple extensions
  • No quotes or array brackets needed
  • Be specific to avoid over-applying rules

Debugging Rules

Rule Not Applying?
  1. Check the globs pattern matches your file
  2. Verify frontmatter YAML syntax is correct
  3. Ensure alwaysApply is set appropriately
  4. Try manually invoking with @ruleName
Rule Conflicting?
  1. Check if multiple rules apply to the same files
  2. Make rules more specific with tighter globs
  3. Consolidate related rules into one file

Advanced Features

Conditional Rules

Use alwaysApply: false for rules that should only apply in specific contexts:

yaml
---
description: Performance optimization guidelines
globs: **/*.ts
alwaysApply: false
---

Invoke with: @performance-optimization refactor this component

Hierarchical Rules

More specific globs take precedence:

  • design-system.mdc with globs: **/*.tsx (broad)
  • trigger.basic.mdc with globs: **/trigger/**/*.ts (specific)

The specific rule will have more weight for trigger files.

Quick Reference

Create a New Rule
bash
touch .cursor/rules/my-new-rule.mdc
yaml
---
description: What this rule enforces
globs: **/*.{ts,tsx}
alwaysApply: true
---

# Rule Title

## Guidelines

- Point 1
- Point 2
Apply a Rule
  • Automatic: Save a file matching the globs pattern
  • Manual: Use @my-new-rule in your prompt
Debug a Rule
  1. Check file matches globs pattern
  2. Verify YAML frontmatter syntax
  3. Look for conflicting rules
  4. Try manual invocation

Remember: Rules are here to help, not hinder. If a rule doesn't make sense for a specific case, discuss with the team and update the rule accordingly.

© trycompai, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cursor-usage of trycompai/comp.

Open the folder on GitHubat commit 0117612

Compare with similar skills

Cursor Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cursor Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cursor Usage this skilltrycompai/comp2k—~1.5kAutomated safety check: PassAGPL-3.0
Agent Instructionsmurphytrueman/design-system-ops203—~2.3kAutomated safety check: PassMIT
Eisland Dev Update DocsJNTMTMTM/eIsland320—~1.4kAutomated safety check: PassGPL-3.0
Eisland Dev Update DocsJNTMTMTM/eIsland320—~1.8kAutomated safety check: PassGPL-3.0
Docouture Documenting ChangesInditexTech/weavejs208—~1.3kAutomated safety check: PassApache-2.0
ReflectNikiforovAll/claude-code-rules141—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Agent Instructions

    murphytrueman/design-system-ops

    Write the AGENTS.md that tells coding agents how to use this design system: where things live, sourced rules, how to check work, what not to do; Claude, Cursor or Copilot pointers on request.

    203 GitHub stars~2.3k tokensUpdated 14 days ago
    Agent WorkflowsAuto-check passed
  • Eisland Dev Update Docs

    JNTMTMTM/eIsland

    Update or create documentation in the eIsland VuePress docs site (web/eisland-web-docs).

    320 GitHub stars~1.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Eisland Dev Update Docs

    JNTMTMTM/eIsland

    Update or create documentation in the eIsland VuePress docs site (web/eisland-web-docs).

    320 GitHub stars~1.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • How to update an existing docouture documentation site when a feature, change, deprecation or fix lands in the repo — figuring out what's affected from a diff/commit/PR, confirming with the user…

    208 GitHub stars~1.3k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Reflect

    NikiforovAll/claude-code-rules

    Analyze a Claude Code session for "wrong-turn" moments (corrections, retries, waste, reversals, dead-ends) and produce an interactive HTML dashboard with copy-able recommendations (CLAUDE.md rules…

    141 GitHub stars~1.8k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Research Setup

    brycewang-stanford/Auto-Empirical-Research-Skills

    Interactive setup wizard that configures a new project for the social-science-research plugin.

    4.5k GitHub stars~1.2k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed

More from trycompai/comp

All 31 skills in this repo
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Check Results Service

    trycompai/comp

    How to reuse ANY integration check's results in a feature via the universal CheckResultsService (apps/api integration-platform).

    2k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Data

    trycompai/comp

    A skill your agent uses when implementing data fetching, API calls, server/client components, or SWR hooks

    2k GitHub stars~955 tokensUpdated today
    Auto-check passed
  • A skill your agent uses when SDK generation failed or seeing errors.

    2k GitHub stars~938 tokensUpdated today
    Auto-check passed
  • Forms

    trycompai/comp

    A skill your agent uses when building forms - covers React Hook Form, Zod validation, and form patterns

    2k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Code

    trycompai/comp

    A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization

    2k GitHub stars~909 tokensUpdated today
    Auto-check: warnings

Questions about Cursor Usage

What does Cursor Usage do?

How to write and manage Cursor rules - invoke with @cursor-usage. Cursor Usage is an agent skill from trycompai/comp.

When should I use Cursor Usage?

Cursor Usage fits situations like: tasks that involve Agent instruction files.

How do I install Cursor Usage in Claude Code?

Run `npx skills add trycompai/comp --skill cursor-usage -a claude-code`. Or copy the skill folder (.agents/skills/cursor-usage in trycompai/comp) into .claude/skills/cursor-usage in your project. Claude Code loads it when a task matches its description.

How do I install Cursor Usage in Codex?

Run `npx skills add trycompai/comp --skill cursor-usage -a codex`. Or copy the skill folder (.agents/skills/cursor-usage in trycompai/comp) into .agents/skills/cursor-usage in your project. Codex loads it when a task matches its description.

Can I use Cursor Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trycompai/comp --skill cursor-usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-usage, .gemini/skills/cursor-usage, .github/skills/cursor-usage and .opencode/skills/cursor-usage in your project.

What does Cursor Usage need to run?

SKILL.md names no scripts, command-line tools or credentials: Cursor Usage is instructions for the agent only.

Does Cursor Usage access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cursor Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cursor Usage use?

Cursor Usage is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cursor Usage use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cursor Usage?

Skills that share tags, products or a category with Cursor Usage: Agent Instructions (murphytrueman/design-system-ops, 203 stars), Eisland Dev Update Docs (JNTMTMTM/eIsland, 320 stars), Eisland Dev Update Docs (JNTMTMTM/eIsland, 320 stars) and Docouture Documenting Changes (InditexTech/weavejs, 208 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cursor Usage?

trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,018 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 7, 2026.

Source: trycompai/comp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.