Agent skill

Shadmin Dev

by ahaodev in ahaodev/shadmin

Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS).

MITAuto-check passedFrontend & Design

Install Shadmin Dev

skills CLI
$ npx skills add ahaodev/shadmin --skill shadmin-dev -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ahaodev/shadmin shadmin-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ahaodev/shadmin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/shadmin-dev .claude/skills/shadmin-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shadmin-dev
GitHub stars
174
Token cost
~2.7k tokens
SKILL.md length
817 words
Files
3 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS).

  • Works in 6 steps: Clarify Scope (before writing code) → List All Touched Files → Implement Backend → …
  • Adding/modifying features
  • SKILL.md covers Architecture Overview, Full-Stack Development Workflow, Key Response Format and Boundaries, plus 2 more sections
  • Calls go and pnpm

What it does

Shadmin Dev is an agent skill from ahaodev/shadmin. Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Use when adding/modifying features, CRUD modules, API routes/controllers/usecases/repositories, Ent schemas, frontend pages/routes, React components, TanStack hooks, or any full-stack work in this project. Trigger whenever the user mentions new features, backend changes, frontend changes, database schema changes, permissions, UI pages, tables, forms, or API endpoints — even if they don't explicitly say "feature development."

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/backend.md` and `references/frontend.md`).

It sits in Frontend & Design, covering REST APIs, React components and Database schema design. It works with TanStack, React, TypeScript and Vite. The repository describes itself as: An Enterprise-Grade Full-Stack RBAC Permission Management System Built with Go + React. The licence is MIT.

When your agent uses it

  • Adding/modifying features
  • API routes/controllers/usecases/repositories
  • Frontend pages/routes
  • React components

Example prompts

  • “t explicitly say”
  • “/shadmin-dev”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Clarify Scope (before writing code)
  2. List All Touched Files
  3. Implement Backend
  4. Implement Frontend
  5. Wire Permissions
  6. Generate & Verify

What it can do on your machine

Read from SKILL.md and the folder at commit c35806d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shadmin Dev loads about 2.7k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 132 tokens; SKILL.md has 817 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~132
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ahaodev/shadmin at commit c35806d, republished under its MIT licence (© ahaodev). 817 words, ~2,740 tokens.

Download SKILL.mdSave it as .claude/skills/shadmin-dev/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
shadmin-dev
description
Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Use when adding/modifying features, CRUD modules, API routes/controllers/usecases/repositories, Ent schemas, frontend pages/routes, React components, TanStack hooks, or any full-stack work in this project. Trigger whenever the user mentions new features, backend changes, frontend changes, database schema changes, permissions, UI pages, tables, forms, or API endpoints — even if they don't explicitly say "feature development."

Shadmin Feature Development

Guide full-stack feature development through Shadmin's clean architecture, producing code that compiles, passes lint/tests, and follows established patterns. Most features require both backend and frontend changes — this skill covers the end-to-end workflow.

Architecture Overview

┌─────────────────────────────────────────────────────────────────────┐
│  Frontend (React 19 + TypeScript + Vite)                            │
│  Route File → Page Component → TanStack Query Hook → API Service   │
│       ↕ Zustand (auth-store) ↕ Permission checks                   │
├─────────────────────────────────────────────────────────────────────┤
│  HTTP (Axios apiClient ← Bearer Token injection)                   │
├─────────────────────────────────────────────────────────────────────┤
│  Backend (Go + Gin + Ent ORM)                                      │
│  Route → [JWT MW → Casbin MW] → Controller → Usecase → Repository  │
│       ↕ Domain (contracts, DTOs, errors) ↕ Ent (DB, migrations)    │
└─────────────────────────────────────────────────────────────────────┘

Backend layers — each has exactly one responsibility:

LayerDirectoryResponsibility
Domaindomain/Entity structs, DTOs, Repository/UseCase interfaces, errors, response helpers
Schemaent/schema/DB schema → run go generate ./ent after changes
Repositoryrepository/Data access via Ent, domain↔ent conversion, pagination
Usecaseusecase/Business logic, validation, context.WithTimeout
Controllerapi/controller/HTTP parsing only, Swagger annotations, status code mapping
Routeapi/route/Route registration, middleware wiring
Factoryapi/route/factory.goDI: repo → usecase → controller construction
Bootstrapbootstrap/App init, DB, Casbin, seeds

Frontend layers:

LayerDirectoryResponsibility
Typesfrontend/src/types/TypeScript interfaces matching backend DTOs
Servicesfrontend/src/services/Axios API wrappers, date parsing
Featuresfrontend/src/features/Page components, tables, dialogs, forms, hooks
Routesfrontend/src/routes/TanStack Router file-based routing
Storesfrontend/src/stores/Zustand state (auth, permissions)
Constantsfrontend/src/constants/Permission strings, enums

Full-Stack Development Workflow

Step 1: Clarify Scope (before writing code)

State explicitly:

  • What entities/fields are involved
  • API endpoints: path, method, request/response shapes
  • Whether Casbin permission checks are needed
  • Frontend: pages, tables, forms, dialogs
  • Permission strings (e.g., system:project:add)
Step 2: List All Touched Files

Group by layer — this catches missing pieces early:

# Backend (implement in this order)
domain/<resource>.go
ent/schema/<resource>.go
repository/<resource>_repository.go
usecase/<resource>_usecase.go
api/controller/<resource>_controller.go
api/route/<resource>_routes.go (or modify system_routes.go)
api/route/factory.go

# Frontend (implement in this order)
frontend/src/types/<resource>.ts
frontend/src/services/<resource>Api.ts
frontend/src/features/<module>/<resource>/components/*-provider.tsx
frontend/src/features/<module>/<resource>/hooks/use-<resource>.ts
frontend/src/features/<module>/<resource>/components/*-columns.tsx
frontend/src/features/<module>/<resource>/components/*-table.tsx
frontend/src/features/<module>/<resource>/components/*-form-dialog.tsx
frontend/src/features/<module>/<resource>/components/*-dialogs.tsx
frontend/src/features/<module>/<resource>/components/*-primary-buttons.tsx
frontend/src/features/<module>/<resource>/data/schema.ts
frontend/src/features/<module>/<resource>/index.tsx
frontend/src/routes/_authenticated/<module>/<resource>.tsx
frontend/src/constants/permissions.ts (add new permission keys)
Step 3: Implement Backend

Follow the layer order strictly — each layer depends on the one above.

Read references/backend.md for complete code templates and patterns.

Quick reference for key conventions:

  • IDs: xid.New().String() in Ent schema DefaultFunc
  • Partial updates: pointer fields in Update*Request (*string)
  • Pagination: embed domain.QueryParams, call qp.Paginate() (returns offset, limit)
  • Response: domain.RespSuccess(data) (code=0) / domain.RespError(msg) (code=1)
  • Usecase: every method starts with context.WithTimeout + defer cancel()
  • Errors: sentinel errors in domain, %w wrapping, map to HTTP status in controller
  • Factory: repo → usecase → controller, dependencies from f.db, f.app, f.timeout
  • Routes: protected system routes use casbinMiddleware.CheckAPIPermission()
Step 4: Implement Frontend

Follow the order: types → service → feature module → route file.

Read references/frontend.md for complete code templates and patterns.

Quick reference for key conventions:

  • API response: response.data.data (outer .data = Axios, inner .data = domain.Response.Data)
  • Date parsing: API service converts string dates to Date objects
  • Query params: URLSearchParams construction, snake_case to match backend
  • Table state: useTableUrlState hook syncs pagination/filters with URL
  • Dialog state: string-based via context provider (open === 'add' | 'edit' | 'delete')
  • Permissions: usePermission() hook, PERMISSIONS.SYSTEM.RESOURCE.ACTION constants
  • Toast: sonner for success/error notifications
  • Forms: React Hook Form + Zod, single hook handles create/edit
  • Route file: Zod schema validates URL search params with .catch() defaults
Show full SKILL.md (418 more words)Show less
Step 5: Wire Permissions

Shadmin uses a dual-layer permission model:

Backend (API access):    Casbin checks (userID, path, method)
Frontend (UI visibility): Permission strings like "system:project:add"

These are linked through the Role → Menu → API Resources binding:

  1. Backend auto-scans routes into API resources on startup (bootstrap.InitApiResources)
  2. API resource IDs are deterministic: METHOD:/api/v1/path (e.g., GET:/api/v1/system/project)
  3. Admin assigns menus to roles, each menu binds to API resources
  4. Frontend fetches permissions from /api/v1/resources and stores in Zustand

To add permissions for a new feature:

  1. Backend: routes are scanned into API resources by bootstrap.InitApiResources; route inventory changes advance the authorization generation.
  2. Frontend: add permission constants in frontend/src/constants/permissions.ts.
  3. Admin panel: create menu entries, bind API resources, assign to roles.
  4. For any new write path that changes users, roles, menus, API resources, or their authorization edges, use the repository authorization transaction helper so the DB change and authz_state.generation update commit together. Do not mutate the live Casbin Enforcer directly.

Casbin snapshot lifecycle: Ent authorization relations are the source of truth. Each process builds a complete in-memory Enforcer snapshot and publishes it atomically; a committed authz_states.generation update triggers local synchronization, while AUTHZ_SYNC_POLL_INTERVAL_SECONDS provides low-frequency recovery polling (default one hour) for missed triggers, restarts, and cross-instance changes. Snapshots are not persisted through Casbin AutoSave. If a generation change is detected or cannot be checked, protected Casbin requests fail closed until a fresh snapshot is published. Keep the existing g/p semantics (active users/roles, public resources excluded, admin wildcard) unless a separately reviewed change intentionally changes them.

Step 6: Generate & Verify
bash
# Backend
go generate ./ent           # If schema changed
go fmt ./... && go vet ./... # Format + static analysis
go test ./...                # Run tests
swag init -g main.go --output ./docs  # If Swagger annotations changed

# Frontend (from frontend/)
pnpm lint                   # ESLint
pnpm format:check           # Prettier
pnpm build                  # Recommended if routes/build config changed

Key Response Format

go
// Success (HTTP 200/201)
type Response struct {
    Code int         `json:"code"`    // 0 = success
    Msg  string      `json:"msg"`     // "OK"
    Data interface{} `json:"data"`    // payload
}

// Error (HTTP 400/404/500)
// Code = 1, Msg = error description, Data = nil

// Paginated response (in Data field)
type PagedResult[T any] struct {
    List       []T `json:"list"`
    Total      int `json:"total"`
    Page       int `json:"page"`
    PageSize   int `json:"page_size"`
    TotalPages int `json:"total_pages"`
}

Boundaries

Things to never do:

  • No business logic in controllers — controllers parse HTTP, call usecase, return response
  • No HTTP/permission logic in repositories — repositories do data access only
  • No bypassing Casbin on protected APIs
  • No new globals — use factory's f.db, f.app, f.timeout
  • No inline API calls in React — all API access goes through services/ wrappers
  • No direct localStorage for auth — use useAuthStore
  • No editing components/ui/ — shadcn-generated primitives
  • No hardcoded menus — menus come from backend /api/v1/resources
  • No unnecessary dependencies — frontend or backend
  • Minimal changes — only touch files relevant to the feature

Reference Files

For detailed code templates and implementation patterns, read these as needed:

  • references/backend.md — Complete Go/Gin/Ent code templates for domain, schema, repository, usecase, controller, routes, and factory. Read when implementing backend features.
  • references/frontend.md — Complete React/TypeScript code templates for types, API services, feature modules, hooks, tables, forms, dialogs, routes, and permissions. Read when implementing frontend features.

Further Documentation

The docs/getting-started/ directory contains comprehensive guides:

  • quickstart.zh.md / quickstart.en.md — Quick start guide
  • architecture.zh.md / architecture.en.md — Architecture deep-dive
  • development.zh.md / development.en.md — Full CRUD walkthrough with example
  • deployment.zh.md / deployment.en.md — Production deployment guide

© ahaodev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .agent/skills/shadmin-dev of ahaodev/shadmin.

  • SKILL.md
  • references/backend.md
  • references/frontend.md

Open the folder on GitHubat commit c35806d

Compare with similar skills

Shadmin Dev next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shadmin Dev compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shadmin Dev this skillahaodev/shadmin174—~2.7kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
Creative Tim UI Blockscreativetimofficial/ui12k—~2.1kAutomated safety check: NotesMIT
Animated React Component LibrariesHainrixz/editor-pro-max2601 repos~5.7kAutomated safety check: PassCustom licence
Morphous CatalogAmeyanagi/morphos102—~2.1kAutomated safety check: PassApache-2.0
Buzzformbuildnbuzz/buzzform101—~1.5kAutomated safety check: PassMIT

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Creative Tim UI Blocks

    creativetimofficial/ui

    Helps install, generate and review Creative Tim UI blocks: shadcn/ui-based React and Tailwind sections that follow a restrained, production-minded design philosophy.

    12k GitHub stars~2.1k tokensUpdated 6 mo ago
    Frontend & DesignAuto-check: notes
  • Animated React Component Libraries

    Hainrixz/editor-pro-max

    Helps choose and drop in animated React components from Magic UI and React Bits for landing pages, marketing sites and dashboards, instead of hand-coding animations.

    260 GitHub starsUsed in 1 repo~5.7k tokens
    Frontend & DesignAuto-check passed
  • Morphous Catalog

    Ameyanagi/morphos

    Create or refresh Morphous website design-system/theme bundles from animal, insect, plant, landscape, mineral, weather, or other nature motifs.

    102 GitHub stars~2.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Buzzform

    buildnbuzz/buzzform

    A skill your agent uses when working with BuzzForm schema-driven forms, @buildnbuzz/form-core, @buildnbuzz/form-react, or any related APIs like defineSchema, InferType, FormProvider, useDataField…

    101 GitHub stars~1.5k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Web Artifacts Builder

    LeastBit/Claude_skills_zh-CN

    用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建复杂的、多组件的 claude.ai HTML artifact 的工具套件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact - 不适用于简单的单文件 HTML/JSX artifact。

    588 GitHub stars~458 tokensUpdated 8 mo ago
    Frontend & DesignAuto-check passed

More from ahaodev/shadmin

  • Cleanup Specialist

    ahaodev/shadmin

    Safe cleanup of Shadmin's Go backend, React frontend, Go CLI, and docs — remove dead code, consolidate duplication, and improve maintainability without changing behavior or adding features.

    174 GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Shadmin CLI

    ahaodev/shadmin

    A skill your agent uses when the user asks to query Shadmin admin platform resources (users, roles, menus, registered API resources) from a terminal — for example "list shadmin users", "show shadmin…

    174 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check: notes

Questions about Shadmin Dev

What does Shadmin Dev do?

Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Shadmin Dev is an agent skill from ahaodev/shadmin. Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS).

When should I use Shadmin Dev?

Shadmin Dev fits situations like: adding/modifying features; API routes/controllers/usecases/repositories; frontend pages/routes; React components.

How do I install Shadmin Dev in Claude Code?

Run `npx skills add ahaodev/shadmin --skill shadmin-dev -a claude-code`. Or copy the skill folder (.agent/skills/shadmin-dev in ahaodev/shadmin) into .claude/skills/shadmin-dev in your project. Claude Code loads it when a task matches its description.

How do I install Shadmin Dev in Codex?

Run `npx skills add ahaodev/shadmin --skill shadmin-dev -a codex`. Or copy the skill folder (.agent/skills/shadmin-dev in ahaodev/shadmin) into .agents/skills/shadmin-dev in your project. Codex loads it when a task matches its description.

Can I use Shadmin Dev in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ahaodev/shadmin --skill shadmin-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shadmin-dev, .gemini/skills/shadmin-dev, .github/skills/shadmin-dev and .opencode/skills/shadmin-dev in your project.

What does Shadmin Dev need to run?

Going by SKILL.md and its folder, Shadmin Dev needs the command-line tools its instructions call (go and pnpm).

Does Shadmin Dev access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Shadmin Dev safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shadmin Dev use?

Shadmin Dev is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shadmin Dev use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Shadmin Dev?

Skills that share tags, products or a category with Shadmin Dev: Web Artifacts Builder (anthropics/skills, 180k stars), Creative Tim UI Blocks (creativetimofficial/ui, 12k stars), Animated React Component Libraries (Hainrixz/editor-pro-max, 260 stars) and Morphous Catalog (Ameyanagi/morphos, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shadmin Dev?

ahaodev (a GitHub user) maintains it in ahaodev/shadmin, which has 174 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 2, 2026.

Source: ahaodev/shadmin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.