src

src is a cursor rule for Cursor from gabrielmoreira/agent-skills-mirror. It costs 766 tokens per session, scanned A, a copy of src, MIT.

A set of development conventions for the AgentDock client’s `/src` directory, which contains a Next.js web application. It covers application structure, UI components, adapters, provider connections, API routes, validation, and error handling.

In plain words
What is it for?
Use it when changing Next.js pages, API route handlers, UI components, adapters, state handling, or provider integrations in the client application.
Why use it?
It helps code changes fit the existing architecture and makes API and component behaviour more consistent.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when changing Next.js pages, API route handlers, UI components, adapters, state handling, or provider integrations in the client application.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/gabrielmoreira/agent-skills-mirror/src
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/gabrielmoreira/agent-skills-mirror

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for src

README.md
[![agentmods](https://agentmods.dev/badge/rules/gabrielmoreira/agent-skills-mirror/src/github.svg)](https://agentmods.dev/rules/gabrielmoreira/agent-skills-mirror/src)
Your own site
<a href="https://agentmods.dev/rules/gabrielmoreira/agent-skills-mirror/src"><img src="https://agentmods.dev/badge/rules/gabrielmoreira/agent-skills-mirror/src/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for src

Your own site · 80×15
<a href="https://agentmods.dev/rules/gabrielmoreira/agent-skills-mirror/src"><img src="https://agentmods.dev/badge/rules/gabrielmoreira/agent-skills-mirror/src.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 766 This file is loaded in full into every session.
When invoked 766 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00766 $0.00766
Opus 5.5 $0.00306 $0.00306
Sonnet 5.5 $0.00153 $0.00153
Haiku 4.5 $0.00077 $0.00077

Measured 1mo ago against content hash a150bf9d8e7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

src scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to src — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

mirrors/repos/AgentDock@AgentDock/.cursor/rules/src.mdc · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentDock Open Source Client (Next.js) Application Structure Rules (/src)

This file outlines development conventions and architectural principles for the AgentDock OSS Client codebase in the /src directory. These rules ensure consistent implementation and maintainable code.

Core Architecture

The OSS Client is built on Next.js App Router and integrates with the agentdock-core framework via:

  • Adapter Pattern: agent-adapter.ts and orchestration-adapter.ts bridge the core framework
  • Provider Integration: LLM providers are implemented with configurable environment keys or user-provided keys
  • Stateless Design: Components are designed to be stateless where possible, with state managed in stores

Directory Structure & Implementation Guidelines

App Router Structure

  • [app/](mdc:src/app): Use standard Next.js App Router conventions
    • Route handlers in [app/api/](mdc:src/app/api) must implement proper error handling
    • Always document API parameters with JSDoc and implement Zod validation
    • Implement specific error types (400, 401, 404, 500) with clear messages

Component Development

  • Implement pure UI components in [components/ui/](mdc:src/components/ui) following shadcn/ui patterns
  • Feature components should be placed in domain-specific directories:
    • [components/chat/](mdc:src/components/chat): Chat interface components
    • [components/agents/](mdc:src/components/agents): Agent management components
  • Use the provider pattern in [components/providers/](mdc:src/components/providers) for cross-cutting concerns

Core Implementation

  • [lib/](mdc:src/lib) contains the core business logic and utilities
    • Implement adapters for agentdock-core integration in the root directory
    • Place type definitions in [lib/types/](mdc:src/lib/types) for shared schema
    • Use [lib/store/](mdc:src/lib/store) for Zustand stores following the store pattern

Tool Implementation

  • Custom tools must follow the implementation pattern in [nodes/](mdc:src/nodes)
  • Each tool must:
    • Export a tool implementation that matches the Tool interface
    • Include appropriate Zod schema for parameters
    • Define error handling for all failure cases
    • Register via the tool registry export pattern
    • Follow the existing file structure

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 85 lines · 766 tokens per session scan A a150bf9d8e7d

Subscribe to this mod's changes

src is a cursor rule published in the GitHub repository gabrielmoreira/agent-skills-mirror (19 stars, last pushed yesterday), licensed MIT. It adds 766 tokens to every session, about $0.0031 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to src, differing in 0 lines, and is treated as a copy.