Agent skill

Code

by trycompai in trycompai/comp

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

AGPL-3.0Auto-check: warningsDevelopment

Install Code

The automated check flagged lines worth reading first. See the safety section below.

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

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

GitHub CLI
$ gh skill install trycompai/comp code --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/code .claude/skills/code && 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
code
GitHub stars
2k
Token cost
~909 tokens
SKILL.md length
71 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
AGPL-3.0

At a glance

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

  • Writing TypeScript/React code - covers type safety
  • SKILL.md covers TypeScript, React Patterns, File Structure and Code Quality, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Component patterns

What it does

Code is an agent skill from trycompai/comp. Use when writing TypeScript/React code - covers type safety, component patterns, and file organization

Its SKILL.md is about 910 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 Development, covering Type safety and File organization. It works with TypeScript and React. 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

  • Writing TypeScript/React code - covers type safety
  • Component patterns
  • File organization

Example prompts

  • “/code”

What it can do on your machine

Read from SKILL.md and the folder at commit 1bf4d52. 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 typescript).

    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

Code loads about 909 tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 71 words of instructions outside code blocks.

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

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: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a paste, webhook or tunnelling service often used to send data outSKILL.md:91
    toast.promise(saveTask(), {

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 1bf4d52, republished under its AGPL-3.0 licence (© trycompai). 71 words, ~909 tokens.

Download SKILL.mdSave it as .claude/skills/code/SKILL.md (or your agent's skills folder).
name
code
description
Use when writing TypeScript/React code - covers type safety, component patterns, and file organization

Source Cursor rule: .cursor/rules/code.mdc. Original Cursor alwaysApply: false.

Code Standards

TypeScript

No any, No Unsafe Casts
tsx
// ✅ Validate with zod
const TaskSchema = z.object({ id: z.string(), title: z.string() });
const task = TaskSchema.parse(response.data);

// ✅ Use unknown and narrow
const parseResponse = (data: unknown): Task => {
  if (!isTask(data)) throw new Error('Invalid');
  return data;
};

// ❌ Never
const data: any = fetchData();
const task = response as Task;
const name = user!.name;
// @ts-ignore
Generics Over Any
tsx
// ✅ Generic
const first = <T>(items: T[]): T | undefined => items[0];

// ❌ Any
const first = (items: any[]): any => items[0];

React Patterns

Named Exports, PascalCase
tsx
// ✅ Named export, PascalCase file
// TaskCard.tsx
export function TaskCard({ task }: TaskCardProps) { ... }

// ❌ Default export, lowercase
export default function taskCard() { ... }
Derive State, Avoid useEffect
tsx
// ✅ Derived
const completedCount = tasks.filter(t => t.completed).length;

// ❌ Synced state
const [count, setCount] = useState(0);
useEffect(() => {
  setCount(tasks.filter(t => t.completed).length);
}, [tasks]);
When useEffect IS Appropriate
tsx
// External subscriptions
useEffect(() => {
  const sub = eventSource.subscribe(handler);
  return () => sub.unsubscribe();
}, []);

// DOM measurements
useEffect(() => {
  setHeight(ref.current?.getBoundingClientRect().height);
}, []);
Toasts with Sonner
tsx
import { toast } from 'sonner';

toast.success('Task created');
toast.error('Failed to save');
toast.promise(saveTask(), {
  loading: 'Saving...',
  success: 'Saved!',
  error: 'Failed',
});

File Structure

Colocate at Route Level
app/(app)/[orgId]/tasks/
├── page.tsx              # Server component
├── components/
│   └── TaskList.tsx      # Client component
├── hooks/
│   └── useTasks.ts       # SWR hook
└── data/
    └── queries.ts        # Server queries
Share Only When Reused 3+ Times
src/components/shared/    # Cross-page components
src/hooks/                # Shared hooks (useApiSWR, useDebounce)

Code Quality

File Size Limit: 300 Lines

Split large files into focused components.

Named Parameters for 2+ Args
tsx
// ✅ Named
const createTask = ({ title, assigneeId }: CreateTaskParams) => { ... };
createTask({ title: 'Review PR', assigneeId: user.id });

// ❌ Positional
const createTask = (title: string, assigneeId: string) => { ... };
createTask('Review PR', user.id); // What's the 2nd param?
Early Returns
tsx
// ✅ Early return
function processTask(task: Task | null) {
  if (!task) return null;
  if (task.deleted) return null;
  return <TaskCard task={task} />;
}

// ❌ Nested
function processTask(task) {
  if (task) {
    if (!task.deleted) {
      return <TaskCard task={task} />;
    }
  }
  return null;
}
Event Handler Naming
tsx
// ✅ Prefix with "handle"
const handleClick = () => { ... };
const handleSubmit = (e: FormEvent) => { ... };
const handleTaskCreate = (task: Task) => { ... };

Accessibility

tsx
// Interactive elements need keyboard support
<div
  role="button"
  tabIndex={0}
  onClick={handleClick}
  onKeyDown={(e) => e.key === 'Enter' && handleClick()}
  aria-label="Delete task"
>
  <TrashIcon />
</div>

// Form inputs need labels
<label htmlFor="task-name">Task Name</label>
<input id="task-name" type="text" />

© 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/code of trycompai/comp.

Open the folder on GitHubat commit 1bf4d52

Compare with similar skills

Code 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.

Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code this skilltrycompai/comp2k—~909Automated safety check: WarnAGPL-3.0
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Typescript React ReviewerSuFxGIT/scoutarr114—~1.7kAutomated safety check: PassNone
Tanstack Routersecondsky/claude-skills227—~1.9kAutomated safety check: NotesMIT
Clean Code TS Reactpproenca/dot-skills214—~3.1kAutomated safety check: PassMIT
Typescript Refactorpproenca/dot-skills214—~2.3kAutomated safety check: PassMIT

Similar skills

  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Expert code reviewer for TypeScript + React 19 applications.

    114 GitHub stars~1.7k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Tanstack Router

    secondsky/claude-skills

    TanStack Router type-safe file-based routing for React. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    DevelopmentAuto-check: notes
  • Clean Code TS React

    pproenca/dot-skills

    A skill your agent uses when writing, reviewing, or refactoring TypeScript or React code for craftsmanship — naming, function and component shape, error handling, data modeling, tests, and…

    214 GitHub stars~3.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Typescript Refactor

    pproenca/dot-skills

    TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19.

    214 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Frontend Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies React/TypeScript type safety, component design, and state management rules.

    232 GitHub stars~1.7k tokensUpdated 3 days ago
    Frontend & DesignAuto-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 5 days ago
    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 5 days ago
    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 5 days ago
    Auto-check passed
  • A skill your agent uses when SDK generation failed or seeing errors.

    2k GitHub stars~938 tokensUpdated 5 days ago
    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 5 days ago
    Auto-check passed
  • Generate MCP Server

    trycompai/comp

    A skill your agent uses when generating an MCP server from an OpenAPI spec with Speakeasy.

    2k GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed

Works with

Categories

Questions about Code

What does Code do?

A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization. Code is an agent skill from trycompai/comp.

When should I use Code?

Code fits situations like: writing TypeScript/React code - covers type safety; component patterns; file organization.

How do I install Code in Claude Code?

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

How do I install Code in Codex?

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

Can I use Code 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 code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code, .gemini/skills/code, .github/skills/code and .opencode/skills/code in your project.

What does Code need to run?

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

Does Code 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 Code safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a paste, webhook or tunnelling service often used to send data out. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Code use?

Code 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 Code use?

About 909 tokens (SKILL.md is roughly 3.6k 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 Code?

Skills that share tags, products or a category with Code: Wagmi Feature Development (wevm/wagmi, 6.8k stars), Typescript React Reviewer (SuFxGIT/scoutarr, 114 stars), Tanstack Router (secondsky/claude-skills, 227 stars) and Clean Code TS React (pproenca/dot-skills, 214 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code?

trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,016 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 2, 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.