Index of every page on this site: llms.txt
All skills
neha avatar

/conventions

@eb9f097
Run it yourself

Baseline React Native project conventions for structure, TypeScript, naming, file size, and hygiene. Use when setting up a project, writing new code, or reviewing for consistency.

Use this Skill: https://skilld.dev/gh/neha/rn-developer-skills/conventions

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈48 tokens for metadata: the name and description. ≈684 when used: this file.

Description uses 2.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈193 characters, or 2.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Conventions

Applicability

  • Platforms: iOS and Android
  • React Native: 0.76+ (New Architecture interop assumed unless a checklist item says otherwise)

When to Use

  • Setting up a new React Native project or feature
  • Writing new code that should match the project's structure and style
  • Reviewing a change for consistency with project conventions

These conventions are intended to apply across all work rather than to one activity. See also architecture, testing, and code-review.

Severity

Findings from this skill are should-fix. They do not block a merge.

Guidance

Project Structure

Follow the folder layout the app already uses. Apply the feature-folder checks when starting a new app, or when that app already uses feature folders.

  • New files match the surrounding layout
  • When using feature folders: one feature per folder under src/features/{name}/, shared code only through shared/, and a barrel index.ts for the public API
  • Concerns separated: screens (layout), components (reusable UI), hooks (logic), utils (pure functions)

TypeScript

  • No any — use a precise type or unknown and narrow

Incorrect:

function Profile({ user }: { user: any }) {
  return <Text>{user.name}</Text>;
}

Correct:

interface ProfileProps {
  user: { name: string };
}

function Profile({ user }: ProfileProps) {
  return <Text>{user.name}</Text>;
}
  • No @ts-ignore without an inline explanation of why
  • Component props use a named interface, not an inline object type

Naming

  • New app files use the casing already in the tree
  • Components use PascalCase; hooks use useCamelCase; constants use UPPER_SNAKE_CASE

Skill folders in this repository use kebab-case. That rule is for this repo, not for the app under review.

File size

A file past roughly 300 lines, or a function past roughly 50, is a prompt to split. It is not a review finding on its own.

Hygiene

  • No console.log left in committed code — use a logging utility
  • No commented-out code in commits
  • No TODO without a linked ticket

Commits & Reviews

  • Changes kept focused — one logical change per pull request where practical
  • Focused-skill checklists run before requesting review (see the code-review skill)

Pitfalls

  • Conventions only help if applied consistently; one feature that ignores the structure makes the whole codebase harder to navigate.
  • Treating file-size limits as hard rules rather than signals leads to awkward splits — use them as a prompt to reconsider, not a strict cutoff.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides coding conventions and structural guidelines for React Native development. It contains only documentation and best practices without any executable code, network requests, or data access risks.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at eb9f097. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 2 months ago
version
1.3.0
platforms
[
  "ios",
  "android"
]
react-native-version
0.76+
Other metadata
tags
[
  "react-native",
  "conventions",
  "structure",
  "style"
]

README badge

README badge for neha/rn-developer-skills/conventions