refactor-entry-point-to-action

refactor-entry-point-to-action is a skill for Claude Code, Codex from pekral/cursor-rules. It costs 37 tokens per session (3,641 once invoked), scanned A, original, MIT.

A refactoring workflow that moves business coordination out of a Laravel entry point, such as a controller, job, command, listener, or Livewire component, into a dedicated Action class.

In plain words
What is it for?
Use it to extract orchestration from entry-point methods, create or update the matching Action and validator, run project checks, or review whether an extraction is appropriate without changing code.
Why use it?
It separates request-handling code from the work it coordinates while preserving existing behaviour and response rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to extract orchestration from entry-point methods, create or update the matching Action and validator, run project checks, or review whether an extraction is appropriate without changing code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pekral/cursor-rules/refactor-entry-point-to-action
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pekral/cursor-rules --skill refactor-entry-point-to-action
Clone the repo
git clone --depth 1 https://github.com/pekral/cursor-rules

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for refactor-entry-point-to-action

README.md
[![agentmods](https://agentmods.dev/badge/skills/pekral/cursor-rules/refactor-entry-point-to-action.svg)](https://agentmods.dev/skills/pekral/cursor-rules/refactor-entry-point-to-action)
Your own site
<a href="https://agentmods.dev/skills/pekral/cursor-rules/refactor-entry-point-to-action"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/refactor-entry-point-to-action.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,641 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.03641
Opus 5 $0.00018 $0.01820
Sonnet 5 $0.00007 $0.00728
Haiku 4.5 $0.00004 $0.00364

Measured 7d ago against content hash f350bc706b98, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

refactor-entry-point-to-action 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 7d 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.

skills/refactor-entry-point-to-action/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modes

This skill runs in one of two modes, selected by the caller via MODE (default apply):

  • apply (default) — perform the entry-point → Action refactoring: create / update the Action, move orchestration, run fixers / checkers, and chain the After Completion review. The Execution and Done-when steps below behave as written.
  • cr (read-only lens — invoked by @skills/code-review/SKILL.md, code-review-github, code-review-jira)never modify code, never create files, never stage / commit / push, never run fixers or checkers, and never chain code-review / process-code-review. Scope the analysis to entry points (controller / job / command / listener / Livewire) touched by the PR diff that still hold business orchestration, and return — as markdown only — the proposed Action extraction for each: the entry-point Class::method, the orchestration that should move out, the target app/Actions/<Domain>/<ActionName> and Data Validator, and the rule reference. The CR folds these into its Refactoring (DRY / tech debt) section (in-scope) or Refactoring proposals section (out-of-scope). Execution steps 3–11 below apply to MODE=apply only.

Constraints

  • Apply @rules/refactoring/general.mdc — incremental migration only, never a big-bang rewrite. The Test Coverage Contract in that rule is binding: 100% coverage of the target lines must exist in a dedicated test(scope): cover <area> before refactor commit before the entry-point change lands, and the assertion logic of those tests must remain unchanged through the refactor commit.
  • Apply @rules/php/core-standards.mdc.
  • If the current project uses Laravel, also apply @rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, and @rules/laravel/livewire.mdc
  • Preserve behavior, signatures, response contracts, and tenant/account scope. Rewrite the entry-point code strictly per the applied rules — anything that would deviate (parameter count, naming, nesting, layer placement, validation home) is rewritten until it complies.
  • Do not report review output to any third-party service.
  • After changes (MODE=apply only), run an internal architecture-first review and fix important findings immediately. In MODE=cr there are no changes — emit the Action-extraction proposal and stop.

Read the full file on GitHub · 111 lines

Changes

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.

  1. 7d ago First seen · 111 lines · 37 tokens per session scan A f350bc706b98

Subscribe to this mod's changes

refactor-entry-point-to-action is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It adds 37 tokens to every session and 3,641 once invoked, about $0.0002 per session on Opus 5. 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-08-31.

Related

Other skills, from other repositories

sdd-apply

Skill "sdd-apply" from Gentleman-Programming/gentle-ai, covering execution role, language domain contract, purpose, what you receive and execution and persistence contract.

Gentleman-Programming/gentle-ai · 0 tokens

kafka-connector-review

Review Kafka Connect connector configurations for common misconfigurations using the Lenses MCP server. Checks error handling, DLQ setup, converters, transforms, task count and task health. Use when user says "review connectors", "check connector configs", "why is my connector failing" or asks about Kafka Connect…

lensesio/agentic-engineering-for-apache-kafka · 79 tokens

kafka-dlq-review

Review dead letter queue implementations for completeness using the Lenses MCP server. Checks DLQ topic existence, configuration, monitoring, metadata preservation, retry logic, reprocessing paths and connector DLQ alignment. Use when user says "review dead letter queues", "check DLQ setup", "DLQ audit" or asks about…

lensesio/agentic-engineering-for-apache-kafka · 93 tokens

kafka-perf-review

Review Kafka producer and consumer performance configurations in both the live cluster (via Lenses MCP) and the codebase. Flags un-tuned defaults, anti-patterns and missing best practices. Use when user says "review Kafka performance", "check producer configs", "tune Kafka settings" or asks about throughput, batching…

lensesio/agentic-engineering-for-apache-kafka · 82 tokens

kafka-schema-review

Review Kafka schema changes (Avro, Protobuf, JSON Schema) for compatibility and evolution best practices using the Lenses MCP server. Detects breaking changes, missing defaults, schema drift and naming issues. Use when user says "review schema changes", "check schema compatibility", "will this schema break consumers"…

lensesio/agentic-engineering-for-apache-kafka · 89 tokens

fec-data-fetching

A frontend guide for handling data that comes from a server, including typed requests, caching, refreshing, pagination, and updates. Server state means data owned by an API rather than by a page’s local controls.

bovinphang/frontend-craft · 76 tokens