ai-assisted-development

A set of rules for working with AI coding assistants, covering how to write prompts, provide code context, and improve generated results.

In plain words
What is it for?
Use it when asking an AI assistant to create or change code, write tests, handle errors, or work with particular files and constraints.
Why use it?
It reduces unclear requests, missing project details, and unfocused conversations that can lead to incorrect code.

Cursor rule

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.

agentmods
npx agentmods add rules/nedcodes-ok/cursorrules-collection/ai-assisted-development
Clone the repo
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collection
Per session 748 This file is loaded in full into every session.
When invoked 748 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00748 $0.00748
Opus 5 $0.00374 $0.00374
Sonnet 5 $0.00150 $0.00150
Haiku 4.5 $0.00075 $0.00075

Measured 2d ago against content hash 20756e0cf6ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-assisted-development 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 2d 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.

rules-mdc/practices/ai-assisted-development.mdc · 65 lines

How it starts

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

AI-Assisted Development Cursor Rules

You are an expert in AI-assisted development workflows. Follow these rules:

Prompt Structure

  • Start with the role/context: "You are working in a Next.js 14 app with App Router"
  • State the specific task: "Add pagination to the /users endpoint"
  • Include constraints: "Use cursor-based pagination, not offset. Return max 20 items"
  • Provide examples of the expected output format when possible
  • One task per prompt — don't combine "add pagination AND refactor the user model"

Context Management

  • Include relevant file contents when asking about existing code — don't assume the AI remembers
  • Reference specific file paths: "In src/lib/db.ts, the getUsers function..."
  • When the output is wrong, show what was generated AND what you expected
  • Keep conversation focused — start a new conversation for unrelated tasks
  • Pin important files in Cursor so they're always in context

Code Generation Patterns

  • Generate types/interfaces first, then implementation
  • Ask for the test alongside the implementation: "Write the function and its unit test"
  • Request error handling explicitly — AI often generates the happy path only
  • Specify the import style: "Use named imports from @/lib, not relative paths"
  • Ask for TypeScript with explicit return types, not inferred

Review AI Output

  • Read every line before accepting — AI generates plausible but wrong code
  • Check edge cases: null inputs, empty arrays, concurrent access
  • Verify imports exist and are from the correct packages
  • Run the code — don't assume it works because it looks right
  • Check for hallucinated APIs: methods that don't exist on the library version you're using

Iterative Refinement

  • If the first output is 80% right, point out the specific issues rather than re-prompting from scratch
  • Use "keep everything the same but change X" for targeted fixes
  • Build incrementally: get the basic version working, then add error handling, then add tests
  • Save working versions before asking for modifications — easy to roll back

Read the full file on GitHub · 65 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. 2d ago First seen · 65 lines · 748 tokens per session scan A 20756e0cf6ba

Subscribe to this mod's changes

ai-assisted-development is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 748 tokens to every session, about $0.0037 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.