skills/coding-convention/SKILL.md
Automatically applies the project's coding conventions when writing or modifying code. Used when editing or creating Java, TypeScript, React Native, Python, CSS/SCSS files, or when performing code reviews and refactoring.
npx skillsauth add astra-technology-company-limited/astra-methodology coding-conventionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When writing or modifying code, you must follow the conventions below. For detailed rules for each language, refer to the reference documents in this directory.
The following four principles apply to ALL coding work. They are derived from observations on common LLM coding pitfalls (Andrej Karpathy / forrestchang) and bias toward caution over speed. For trivial tasks (typo fixes, obvious one-liners), use judgment.
Source: forrestchang/andrej-karpathy-skills (MIT) — Karpathy's observations on LLM coding pitfalls
ASTRA auto-builder exception: Broad deliverable-generating skills such as
/service-planner,/manual-generator,/catalog-generator,/handoff-publish,/project-init,/sprint-init,/autorunproduce full-stack deliverables explicitly requested by the user, so they are not bound by the scope limit of "Simplicity First". However, the individual code written inside them still follows the four principles.
Detect the language from the target file extension:
.java → Apply Java convention (reference: java-coding-convention.md).ts, .tsx → Apply TypeScript convention (reference: typescript-coding-convention.md).tsx, .ts (React Native project) → Additionally apply React Native convention (reference: react-native-coding-convention.md).py → Apply Python convention (reference: python-coding-convention.md).css, .scss, .sass → Apply CSS/SCSS convention (reference: css-scss-coding-convention.md)React Native Detection: If the project contains
react-nativeorexpoinpackage.jsondependencies, apply the React Native convention as a complementary layer on top of the TypeScript convention for all.tsx/.tsfiles.
Mobile Design Guide: When working on a mobile project (React Native, Flutter, or KMP), additionally reference
$CLAUDE_PLUGIN_ROOT/docs/ux/mobile-design-guide.mdfor UI/UX implementation decisions. This guide provides platform-specific guidelines (Apple HIG Liquid Glass, Material Design 3 Expressive), touch interaction patterns (thumb zone, gesture mapping), animation timing (50~400ms per type), haptic feedback mapping (iOS UIFeedbackGenerator / Android HapticFeedbackConstants), dark mode principles (surface elevation, #121212 not #000000), accessibility requirements (44pt/48dp touch targets, 4.5:1 contrast), and expert polish tips. Apply these standards when creating or modifying UI components, screens, navigation, forms, and animations.
com.example.deepspace (all lowercase)UpperCamelCase (test classes end with Test)lowerCamelCase (verb/verb phrase)UPPER_SNAKE_CASE (static final + deeply immutable)lowerCamelCaseT, E, RequestTpublic/protected members. Summary is a noun/verb phrase (not a sentence)instance.staticMethod() is prohibited)String[] args (O), String args[] (X)L (100L)block__element--modifier), lowercase kebab-casekebab-case, SCSS partials use _ prefix#id usage prohibited)div.class prohibited)#fff), no color keywordsrem, line-height as unitless number, no units on 00.5), border: 0 (not none)$kebab-case, constants $UPPER_SNAKE_CASE, manage related values with Map%placeholder when requiredmin-width), write inline with componentstransform/opacity, no transition: all, prefers-reduced-motion support required!important abuse, transition: all, @extend .class, color keywords, magic numbers, 4+ level nestingUpperCamelCaselowerCamelCaseCONSTANT_CASEsnake_caseT or UpperCamelCaseexport default prohibited, use named exports onlyimport type {...}, require() prohibitedany prohibited → use unknown. Use interface for objects, type alias for union/tupleconst by default, let only when reassignment is needed. var is strictly prohibitedvar, const enum, export default, export let, namespace, #ident, .forEach(), .bind()/.call()/.apply(), @ts-ignore, @ts-nocheck===/!== required (exception: == null). Use for...of (for...in prohibited for arrays)new Error() required, catch uses unknown, empty catch needs justificationApplied as a complementary layer on top of the TypeScript convention when the project is a React Native/Expo project.
kebab-case for all files and folders (login-screen.tsx, use-auth-store.ts)-screen.tsx (e.g., login-screen.tsx, feed-screen.tsx)use- file naming (e.g., use-auth.ts), use + PascalCase in code (useAuth)PascalCase namingexport default prohibited)type for props, destructure in parameters, camelCase namingtrue value for boolean props, no nested ternariesStyleSheet.create() or NativeWind. No inline styles. Styles co-located at file bottomapp/ as thin re-export layer, logic in features/features/ → components/ → lib/). Co-locate testsReact.memo for expensive components, useCallback for FlatList renderers, stable keyExtractor, no callbacks in JSX@/) → relative → type-onlyaccessibilityLabel + accessibilityRole on interactive elements, minimum 44×44 touch targetexport default, inline styles, array index as key, nested ternaries, any for props, console.log in production, Dimensions.get() in rendermypackage (short lowercase)my_module (lowercase_underscore)CapWords (CamelCase)CapWords + Error suffixlowercase_with_underscoresUPPER_CASE_WITH_UNDERSCORESself, class method: clsfrom module import *is None / is not None (== None prohibited), use isinstance() (type() prohibited)if not seq: (use falsy), if len(seq): prohibited"""triple double quotes""", imperative mood ("Return X"), all public membersf = lambda x: 2*x prohibited → def f(x): return 2*xwith statementtools
Runs UAT (User Acceptance Testing) cases in TRUE PARALLEL using Playwright Test runner with isolated browser contexts per worker (separate cookies, localStorage, sessionStorage). Solves the two main limits of /user-test: (1) sequential single-page execution that does not scale beyond a few cases, and (2) one stuck case blocking the rest of the run. Reuses 100% of the /user-test UAT case Markdown+YAML format under docs/tests/uat-cases/, runs them via `npx playwright test --workers=N`, and emits the same report layout (index.html + issues.md + session.json + screenshots/) under docs/tests/uat-reports/. Use when the user asks to "run UAT in parallel", "speed up UAT", "test multi-user", "song song", "uat parallel", or runs /uat-parallel. Distinct from /user-test (sequential Chrome MCP, supports interactive mode), /test-run (developer integration tests), /test-scenario (scenario authoring).
tools
Performs end-user UAT (User Acceptance Testing) by driving a real browser through Chrome MCP, self-verifying each step with hard assertions (DOM / Network / URL / Console), auto-assigning severity on failure, and emitting an HTML report plus issues.md into a timestamped session folder. Supports two modes: interactive (URL + Vietnamese natural-language flow description) and --auto (batch-run pre-authored test cases under docs/tests/uat-cases/). Use when the user asks for "UAT", "user acceptance test", "kiểm thử người dùng", "regression test", or runs /user-test, /uat. Distinct from /test-run (developer-authored technical integration testing) and /test-scenario (scenario authoring from blueprints).
tools
Authors and validates LLM tool descriptions and input schemas (Anthropic Tool Use, MCP servers, LangChain @tool, Pydantic, Zod). Use when the user mentions "tool description", "function calling", "MCP tool", "Pydantic schema", "Zod schema", "@tool decorator", "input_schema", "tool spec", "툴 정의", "함수 호출 스키마", or when editing files that define LLM tool surfaces. Enforces the six required attributes (one-line summary, anti-pattern, synonyms, parameter examples, enum constraints, return shape) and blocks the seven known failure modes — wrong-tool selection, skipped tool, malformed arguments, retry loops, user-intent bypass, wrong side-effect, and un-auditable traces. For authoring ASTRA SKILL.md files use /skill-author instead — this skill is for *runtime* LLM tool surfaces, not for skill files themselves.
development
Creates new SKILL.md files or refactors existing skills to comply with the ASTRA skill best practices guide (docs/development/skill-best-practices.md). Use when user mentions "new skill", "create skill", "SKILL.md", "skill authoring", "스킬 작성", "스킬 만들기", or when editing any file matching skills/**/SKILL.md.