Skip to content
ANISH
SINGH.
0%
Back to Refinery
workflowFREE ME GUIDE

Free Me Guide.

Stop babysitting your AI agent. Set up your environment so Claude handles the workflow.

Reel coming soon

Free Me Guide

What this fixes
  • Claude keeps asking permission for everything
  • No persistent project context
  • Agent doesn't understand your codebase
  • Repetitive manual setup every session

Project instructions

Create a file called CLAUDE.md at your project root. Claude reads it at the start of every session. Put your tech stack, coding conventions, file structure, and any rules you want followed. This is the single most impactful thing you can do.

Example CLAUDE.md structure

A minimal starting point — adapt to your project

## Project
- **Stack**: Next.js 15, TypeScript, Tailwind CSS
- **Deploy**: Vercel

## Conventions
- Use App Router (not Pages Router)
- Prefer server components by default
- Use `cn()` from lib/utils for class merging
- UK English in all copy

## Structure
- app/ — routes and layouts
- components/ — reusable components
- lib/ — utilities, types, constants

## Rules
- Never modify .env files
- Always run the build before committing
- Use semantic commit messages

Permissions

Claude asks permission before running shell commands or editing files. You can pre-approve safe commands in .claude/settings.json so it stops asking for the routine stuff. Only allow commands you understand.

Example permission allowlist

Add to .claude/settings.json — only common read-only and build commands

{
  "permissions": {
    "allow": [
      "Bash(npm run build)",
      "Bash(npm run lint)",
      "Bash(npm run dev)",
      "Bash(git status)",
      "Bash(git diff)",
      "Bash(git log:*)",
      "Bash(ls:*)",
      "Bash(cat:*)",
      "Bash(find:*)",
      "Bash(grep:*)"
    ]
  }
}

Tool access

MCP (Model Context Protocol) servers give Claude access to external tools — databases, browsers, APIs, documentation. You add them with a single command. Each server extends what Claude can do without you manually copy-pasting data in.
Add an MCP server

Example: adding Context7 for library docs

$claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp

Persistent context

CLAUDE.md is loaded every session automatically. Use it as your project's memory. Decisions, patterns, constraints — anything Claude should know before it starts working. Update it as the project evolves.

Adding decisions to CLAUDE.md

Append this pattern when you make a project decision

## Decisions
- **2025-01-15**: Use Supabase for auth, not NextAuth — simpler setup, row-level security built in.
- **2025-01-20**: All API routes return { data, error } shape — consistent error handling.
- **2025-02-01**: Images stored in /public/images/, never external URLs — offline dev works.

Task planning

Claude tracks tasks internally with TodoRead and TodoWrite. For complex features, use /plan to get Claude to break the work into steps before touching code. This prevents the agent from going off in the wrong direction on large tasks.
Ask Claude to plan first
$/plan

Agent instructions

Good CLAUDE.md instructions are specific, bounded, and convention-driven. Bad instructions are vague ("write clean code") or impossibly broad ("follow best practices"). Tell Claude exactly what your project does, what patterns to use, and where the boundaries are.

Folder structure

A clean folder structure helps Claude navigate your project faster. Keep source code, configuration, and generated output clearly separated.

Recommended layout for Claude-first projects

project-root/
├── CLAUDE.md              # Project instructions (loaded every session)
├── .claude/
│   └── settings.json      # Permissions and local config
├── app/                   # Routes (Next.js) or src/
├── components/            # Reusable UI
├── lib/                   # Utilities, types, constants
├── public/                # Static assets
├── package.json
└── tsconfig.json

Give This To Your Agent

Copy these prompts and paste them directly into Claude Code. Each one inspects or improves a specific part of your setup.

Inspect my environment

Makes Claude audit your current setup and report what is configured vs missing.

Read my CLAUDE.md (if it exists), .claude/settings.json (if it exists), and package.json. Then report:

1. What project instructions exist and whether they cover: tech stack, conventions, file structure, and rules.
2. What permissions are configured and whether they match the scripts in package.json.
3. What MCP servers are connected (check .claude.json and .mcp.json).
4. What is missing or could be improved.

Do not change anything. Just report what you find in a clear summary.

Set up project instructions

Makes Claude analyze your project and generate a CLAUDE.md tailored to it.

Analyze this project:
1. Read package.json for the tech stack and scripts.
2. Read tsconfig.json or equivalent for language config.
3. Scan the top-level folder structure.
4. Look at 2-3 existing source files to understand patterns and conventions.

Then generate a CLAUDE.md file that covers:
- Project name and what it does (one line)
- Tech stack with versions
- Coding conventions you can infer from the existing code
- Folder structure explanation
- Any rules worth codifying (import style, component patterns, naming)

Show me the generated CLAUDE.md and ask for approval before writing it.

Configure safe permissions

Makes Claude suggest a permission allowlist based on your project. Every permission is explained before being enabled.

Read my package.json scripts and my current .claude/settings.json (if it exists).

For each script in package.json, suggest whether it should be added to the permissions allowlist and explain what the command does and why it is safe or unsafe to auto-approve.

Group your suggestions into:
- SAFE TO ALLOW: read-only commands, build commands, lint commands
- ALLOW WITH CAUTION: commands that modify files or state
- DO NOT ALLOW: commands that delete data, push to remote, or access secrets

Show me the complete .claude/settings.json you would write, with comments explaining each permission. Ask for my approval before writing anything.

Create task plan

Makes Claude analyze the codebase and create a structured plan for the next piece of work.

Analyze this codebase and help me plan my next task:

1. Read the CLAUDE.md for project context.
2. Check git status and recent commits to understand what was done last.
3. Look at any TODO.md, open issues, or task comments in the code.

Then create a structured task plan:
- What needs to be done (broken into 3-7 concrete steps)
- Which files will likely be touched
- Any dependencies between the steps
- Estimated complexity (simple / moderate / complex)

Present the plan and ask what I want to start with.
Next up

Want more resources?

Follow me on Instagram. New reels every week with a keyword in the caption.

Browse all resources