Borrowing it
Nothing to install: this file belongs to vmnog/calendarcn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vmnog/calendarcn/main/.claude/skills/refactor/SKILL.mdgit clone --depth 1 https://github.com/vmnog/calendarcnWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vmnog/calendarcn/refactor)<a href="https://agentmods.dev/skills/vmnog/calendarcn/refactor"><img src="https://agentmods.dev/badge/skills/vmnog/calendarcn/refactor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vmnog/calendarcn/refactor"><img src="https://agentmods.dev/badge/skills/vmnog/calendarcn/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00700 |
| Opus 5.5 | $0.00000 | $0.00280 |
| Sonnet 5.5 | $0.00000 | $0.00140 |
| Haiku 4.5 | $0.00000 | $0.00070 |
Grade A, and why
refactor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Skill — CalendarCN
When to Use
Invoke when restructuring code, extracting components/hooks, or improving code quality without changing behavior.
Pre-Refactor Checklist
- Verify current state passes:
pnpm lint && pnpm typecheck && pnpm format:check - Identify the scope: Which files will change?
- Check for dependents: Search for imports of the module being refactored
- Plan the changes: Describe what moves where before touching code
Refactor Playbook
Extracting a Component
- Identify the JSX block to extract
- Create
src/components/new-component-name.tsx(kebab-case) - Define
interface NewComponentNamePropsfor all data/callbacks needed - Move JSX into new component function
- Add
"use client"if it uses hooks or browser APIs - Update imports in the parent component
- Run
pnpm typecheckto catch missed props
Extracting a Hook
- Create
src/hooks/use-hook-name.ts - Define
interface UseHookNameOptionsandinterface UseHookNameReturn - Follow the ref-sync pattern for all options:
const optionRef = useRef(option); useEffect(() => { optionRef.current = option; }, [option]); - Store global event handlers in refs
- Return typed object matching
UseHookNameReturn - Clean up all listeners in
useEffectreturn
Extracting Utility Functions
- If the function is pure (no React) →
src/lib/ - If it's event-related →
src/lib/event-utils.ts - Add JSDoc comment describing purpose, params, and return
- Export function (no default exports for utils)
- Add
import typefor any type dependencies
Moving Types
- All shared types must live in
src/components/week-view-types.ts - Component-local types can stay in the component file
- Never duplicate types — always import from canonical source
Post-Refactor Checklist
- Verify:
pnpm lint && pnpm typecheck && pnpm format:check - Visual check:
pnpm dev— test the affected UI manually - Check imports: No circular dependencies introduced
- Check naming: All new files follow
kebab-caseconvention - Check types: No new
anytypes, all imports useimport typewhere applicable - Format:
pnpm formatto normalize style
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 28d ago First seen · 97 lines · 0 tokens per session scan A 69a8aebe8e6b
refactor is a skill published in the GitHub repository vmnog/calendarcn (139 stars, last pushed 27d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 700 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.
Other skills, from other repositories
ui-beats
Use this skill when users want to add, customize, or troubleshoot UI Beats components in React/Next.js projects. It covers component selection, shadcn registry installation from uibeats.com, the UI Beats MCP server, motion and reduced-motion handling, and integration patterns for animated sections.
react-doctor
Run after making React changes to catch issues early. Use when reviewing code, finishing a feature, or fixing bugs in a React project.
migrate-radix-to-base
Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
magic-ui
Use this skill when users want to add, customize, or troubleshoot Magic UI components in React/Next.js projects. It covers component selection, shadcn registry installation (@magicui/), integration patterns, and practical quality checks for accessibility and maintainability.
kiranism-shadcn-dashboard
Guide for building features, pages, tables, forms, themes, and navigation in this Next.js 16 shadcn dashboard template. Use this skill whenever the user wants to add a new page, create a feature module, build a data table, add a form, configure navigation items, add a theme, set up RBAC access control, or work with…
tanstack-form
Headless, performant, and type-safe form state management for TS/JS, React, Vue, Angular, Solid, Lit, and Svelte.