All skills
asyrafhussin avatar

/typescript-react-patterns

@e60e907

TypeScript best practices for React development. Use when writing typed React components, hooks, events, refs, or generic components. Triggers on tasks involving TypeScript errors, type definitions, props typing, or type-safe React patterns.

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/typescript-react-patterns

This session only. Nothing lands on disk.

rules_template.md

≈601 tokens on demand. Your agent reads this file only when SKILL.md points to it.

[rule-name]

Why It Matters

[Brief explanation of why this pattern is important. Focus on:

  • What problem it solves
  • What errors it prevents
  • When you need this pattern]

Incorrect

// ❌ [Brief description of what's wrong]
[Bad code example showing the anti-pattern]

// ❌ [Another common mistake]
[Another bad example]

Why this is problematic:

  • [Specific issue 1]
  • [Specific issue 2]
  • [What errors this causes]

Correct

// ✅ [Description of the correct approach]
[Good code example]

// ✅ [Alternative correct approach if applicable]
[Another good example]

Why this works:

  • [Benefit 1]
  • [Benefit 2]
  • [Type safety gained]

Additional Examples

[Specific Use Case 1]

// Context for when to use this variation
[Code example with explanation]

[Specific Use Case 2]

// Context for this pattern
[Code example with explanation]

Common Patterns

// [Pattern name 1]
[Concise example]

// [Pattern name 2]
[Concise example]

Tips

  • [Quick tip 1]
  • [Common mistake to avoid]
  • [Performance consideration if applicable]
  • [When NOT to use this pattern]

Related

  • See [related-rule-1.md] for [related concept]
  • See [related-rule-2.md] for [related concept]

Template Notes (remove these when creating actual rules):

  1. Title: Use clear, descriptive titles that match the file name
  2. Category: Must match one of the 7 defined categories
  3. Priority:
    • CRITICAL: Fundamental patterns every project needs
    • HIGH: Common patterns most projects use
    • MEDIUM: Advanced patterns for specific needs
    • LOW: Specialized edge cases
  4. Code Examples:
    • Use ✅ for correct examples
    • Use ❌ for incorrect examples
    • Include inline comments explaining key points
    • Show both the problem and solution
  5. Focus on TypeScript + React:
    • Emphasize type safety
    • Show how types flow through the code
    • Include actual type annotations
    • Show IDE autocomplete benefits
  6. Be Concise: Each rule should be scannable in 2-3 minutes
  7. Show Real Examples: Use realistic code, not foo/bar placeholders

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill contains educational reference material and code documentation for TypeScript React development patterns. No security risks or malicious vectors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    30 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e60e907. 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 7 months ago
metadata
{
  "author": "agent-skills",
  "version": "2.0.0"
}

README badge

README badge for asyrafhussin/agent-skills/typescript-react-patterns