Skip to content

Starlight Components Demo

This page demonstrates every Starlight MDX component and formatting convention used throughout the Developer Toolkit documentation. Use it as a reference when writing or editing articles.

Asides highlight important information. Each variant signals a different intent.

The core pattern across Developer Toolkit. Every shared workflow uses three tabs.

Cursor is an IDE-first tool. Workflows happen inside the editor with visual feedback.

Cmd/Ctrl+I Open Agent chat
Cmd/Ctrl+K Inline edit
Tab Accept autocomplete
@file.ts Reference a file

Key features: Tab autocomplete, Background Agent, BugBot, checkpoints, visual diffs.

Tabs can be nested for sub-comparisons within a tool section:

TaskRecommended Model
Complex architectureClaude Opus 4.6
Everyday codingClaude Sonnet 4.5
Speed-critical iterationCursor Composer 1
Bug fixing in CursorGPT-5.2
All Codex workflowsGPT-5.3-Codex
src/lib/auth.ts
interface AuthResult {
success: boolean;
user?: User;
error?: string;
}
export async function authenticateUser(
token: string
): Promise<AuthResult> {
try {
const payload = await verifyJWT(token);
const user = await db.users.findById(payload.sub);
return { success: true, user };
} catch (error) {
return { success: false, error: "Invalid token" };
}
}
config.js
// Configuration update
const config = {
port: process.env.PORT || 3000,
database: process.env.DATABASE_URL,
cacheEnabled: true, // Added: enable caching
// debugMode: true, // Removed: disable debug in production
};
Terminal window
# Install dependencies
npm install @anthropic-ai/claude-code
claude --version
# Initialize project configuration
claude
/init
const users = await db
.select()
.from(usersTable)
.where(eq(usersTable.role, "admin"));

Key Concept

Cards work well for self-contained explanations, definitions, or callouts that deserve visual separation from the main text flow.

Cursor

IDE-first development with visual editing, agent mode, tab autocomplete, and background agents.

Claude Code

CLI-first development with terminal workflows, hooks, custom commands, and headless CI integration.

Codex

Multi-surface development spanning App, CLI, IDE, and Cloud with automations and worktrees.

Steps render a numbered procedural walkthrough. The component expects a single ordered list.

  1. Install the tool

    Choose your preferred AI coding tool and install it following the quick-start guide.

  2. Configure project context

    Create the configuration file (.cursor/rules/, CLAUDE.md, or AGENTS.md) with your project’s tech stack, coding standards, and common commands.

  3. Set up MCP servers

    Install MCP servers for your external tools (database, browser, Git hosting) to give the AI direct access.

  4. Start with a real task

    Pick a low-risk task from your backlog — a bug fix, a test, or a small feature. Work through it with the AI and iterate on your prompts.

  5. Review and refine

    After your first session, update your configuration file based on what worked and what the AI got wrong. The configuration improves with every session.

  • Directorysrc/
    • Directorycomponents/
      • Header.astro
      • Footer.astro
      • PaywallModal.tsx
    • Directorycontent/
      • Directorydocs/
        • Directoryen/
          • Directoryintroduction/
          • Directorycursor-ide/
          • Directoryclaude-code/
          • Directorycodex/
          • Directoryshared-workflows/
          • Directoryappendices/
          • Directoryresources/
        • Directorypl/
    • Directorylib/
      • Directorydb/
        • schema.ts
        • queries.ts
      • auth.ts
    • Directorypages/
      • Directoryapi/
        • Directorysubscription/
        • Directoryauth/
      • index.astro
  • CLAUDE.md
  • Directory.cursor/
    • Directoryrules/
      • project.mdc
  • AGENTS.md
  • package.json
  • astro.config.mjs
FeatureCursorClaude CodeCodex
Tab autocompleteYesNoNo
Background agentsYesYes (headless)Yes (Cloud)
MCP serversYesYesYes
Git integrationBuilt-inVia toolsVia worktrees
Custom commandsExtensions.claude/commands/Slash commands
ModelProviderContextInput $/1MOutput $/1MBest For
Claude Opus 4.6Anthropic200K$5$25Complex architecture
Claude Sonnet 4.5Anthropic1M$3$15Everyday coding
GPT-5.3-CodexOpenAI200K+SubscriptionSubscriptionCodex workflows
GPT-5.2OpenAI200K+$1.25$10Bug fixing
Gemini 3 ProGoogle1M$2$12Multimodal analysis

Badges add inline status indicators:

  • New — New features or recently added content
  • Updated — Recently updated sections
  • Deprecated — Features being phased out
  • Breaking — Breaking changes that require action
  • Stable — Production-ready features
Advanced: Combining MCP servers with custom commands

You can create custom slash commands in Claude Code that leverage MCP servers for multi-step workflows:

---
allowed-tools: [Read, Edit, Bash, mcp__github__create_pull_request]
description: Create a PR from the current changes
---
1. Run: !git diff --stat
2. Summarize the changes
3. Create a PR with a descriptive title and body
4. Report the PR URL

This pattern works because MCP tools are available as allowed-tools in custom command definitions.

Advanced: Cursor rules with agent-selected activation

When you omit both alwaysApply and globs, the rule becomes “agent-selected.” Cursor reads the description field and decides whether the rule is relevant to the current task:

---
description: "Database migration patterns using Drizzle ORM. Use when creating or modifying database schemas."
---
## Migration Rules
- Always create a new migration file, never modify existing ones
- Run `npm run db:migrate` after creating migrations
- Test migrations with `npm run db:migrate:dry`

This is useful for specialized rules that only apply to certain types of tasks.

Reference commands like /compact, files like CLAUDE.md, and keyboard shortcuts like Cmd+I using inline code formatting.

When showing a prompt the user should type or paste:

Review this authentication middleware for security vulnerabilities. Check for: JWT validation issues, missing rate limiting, CSRF protection gaps, and session fixation risks. Suggest fixes with code.

Unordered lists for feature sets and options:

  • MCP servers provide persistent tool connections
  • Agent Skills offer lightweight, shareable capabilities
  • Custom commands create reusable workflows
  • Hooks intercept and modify AI behavior at specific points

Ordered lists for sequential procedures:

  1. Read the error message carefully
  2. Check the relevant log file
  3. Search the codebase for the failing function
  4. Ask the AI to explain the failure mode
  5. Implement and test the fix

Every article in Developer Toolkit (except index pages) follows this structure:

Standard Article Anatomy

  1. Problem Hook (2-3 sentences) — A scenario the reader recognizes from real work
  2. What You Will Walk Away With — Bullet list of concrete outcomes
  3. The Workflow — Step-by-step with real prompts and tool interactions
  4. Copy-Paste Prompts — Ready-to-use prompts in <Aside type="tip"> blocks
  5. When This Breaks — Common failure modes and recovery strategies
  6. What is Next — Links to related articles

This structure ensures every article delivers immediate, actionable value rather than abstract theory.