bencium-code-conventions — Claude Code skill
Sets Bence's conventions for React and Next.js projects, covering the stack, code style, tests and workflow. Use it when building or setting up work under those rules.
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a claude-codeWhat bencium-code-conventions does
This skill steers the agent towards ReactJS, Next.js with the App Router, and TypeScript. For UI work it selects TailwindCSS v3.x and Shadcn UI, with Zustand, TanStack React Query, and Zod in the stated stack. New code uses ES modules, async/await, explicit types, and early returns.
The rules cover @/components/ui, @phosphor-icons/react, sonner, loading states, dynamic imports, and image optimisation. In Next.js, the skill limits 'use client', useEffect, and setState in favour of RSC and SSR. This is a strict convention set: TailwindCSS v4, Docker, and local Postgres conflict with it.
Its workflow is to inspect relevant files, plan the change, write code, then commit. It asks for failing tests before implementation, typechecking after code changes, and test runs before a commit. For backend work, it asks for a choice first and directs API keys to .env plus Vercel or Netlify environment variables.
What it helps with
- set up a Next.js project with the App Router structure
- apply Bence's TypeScript code conventions
- validate schemas with Zod
- write failing tests before implementation
- prepare a project for Vercel or Netlify deployment
Example prompts for the agent
- “Create
app/dashboard/page.tsxfollowing Bence's conventions.” - “Build a React component using
@/components/ui, a loading state, andsonner.” - “Plan the API change, add its tests, then run typechecking.”
How to install bencium-code-conventions
1Skills CLI (Vercel)
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a claude-code2Manually: put the files in place
~/.claude/skills/bencium-code-conventions/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/bencium-code-conventions/
1Skills CLI (Vercel)
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a codex2Manually: put the files in place
.agents/skills/bencium-code-conventions/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a cursor2Manually: put the files in place
.cursor/skills/bencium-code-conventions/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install bencium/bencium-marketplace bencium-code-conventions2Manually: put the files in place
.github/skills/bencium-code-conventions/SKILL.md1Skills CLI (Vercel)
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a gemini-cli2Platform CLI
gemini skills install https://github.com/bencium/bencium-marketplace --path bencium-code-conventions/skills/bencium-code-conventionsManually: put the files in place
.devin/skills/bencium-code-conventions/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about bencium-code-conventions
How do I install bencium-code-conventions in Claude Code?
Run npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a claude-code, then run npx skills add bencium/bencium-marketplace --skill bencium-code-conventions -a claude-code again. The skill file is at ~/.claude/skills/bencium-code-conventions/SKILL.md.
What does bencium-code-conventions do?
It gives an agent Bence's rules for project setup and code changes, including ReactJS, Next.js, TypeScript, TailwindCSS v3.x, testing, and development workflow.
How does the skill handle backend setup?
It asks for a backend choice and points to Postgres-compatible convex.dev or Supabase. Its conventions avoid local Postgres and Docker.
Source text
SKILL.md · MIT
--- name: bencium-code-conventions description: Bence's code style, tech stack, and workflow conventions when_to_use: When writing code or setting up projects for Bence --- # Code Conventions ## Core Technologies - **Frontend:** ReactJS, Next.js (App Router structure), TypeScript - **Styling:** TailwindCSS v3.x (never v4), Shadcn UI - **Build Tools:** Vite (when applicable) - **Backend:** Postgres compatible convex.dev or Supabase (always ask, never local postgres) - **Deployment:** Netlify or Vercel or Fly - suggest - **Environment:** Mac M2, Python3 with virtual environments, no CUDA, no Docker - **Alternative Languages:** Avoid python if you can, try using RUST ## Code Style & Structure - Use ES modules (import/export) syntax - Destructure imports when possible - Use TypeScript for all new code - Use async/await instead of Promise chains - Prefer const/let over var; use early returns - Use consts instead of functions: `const toggle = () =>`. Define types. - Use descriptive variable names with auxiliary verbs (e.g., `isLoading`, `hasError`) - Use lowercase with dashes for directory names (e.g., `components/auth-wizard`) ## Framework Conventions - **Next.js:** Use App Router (app directory) structure and page.tsx files - **React:** Functional and declarative patterns; avoid classes - **State Management:** Zustand, TanStack React Query - **Validation:** Zod for schema validation ## Component Library & Styling - **Component Library:** Prefer shadcn components from `@/components/ui` - **Styling:** Tailwind utility classes - **Layout:** Grid/flex wrappers with `gap` for spacing - **Icons:** `@phosphor-icons/react` - **Toasts:** `sonner` for notifications - Always add loading states, spinners, placeholder animations ## Quality Assurance & Testing - **TDD:** Write failing tests first, commit them, then iterate until suite passes - Never mock tests - if there's a test script, execute all until done - Always write SQL in chunks with test steps after each chunk - Typecheck after making code changes - Run tests before committing - Prefer running single tests for performance, not whole suite ## Error Handling - Implement proper error handling and user input validation - Error messages should be understood by non-technical people - Use early returns for error conditions - Test APIs via curl commands first, then implement in code ## Performance & Architecture - Minimize `'use client'`, `useEffect`, `setState`; favor RSC and Next.js SSR - Implement dynamic imports for code splitting - Optimize images: WebP format, size data, lazy loading - Favor small, simple, well-named modules ## Development Workflow **Process:** Explore → Plan → Code → Commit - Read relevant files - Think through a plan - Implement - Then commit - Never local backend, always ask (usually Supabase, Neon) - Minimal dependency, no docker ## Environment & Deployment - Add .env files for API keys; warn me to save keys in Vercel/Netlify env variables - Write code deployable to Netlify or Vercel; prepare to build locally first - Document progress in progress.md; ask for implementation plan
© bencium · MIT · bencium/bencium-marketplace