Agent skill
enterprise-table
Generate production-ready B2B data tables with Ant Design Pro, URL sync, and advanced typing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/enterprise-table
SKILL.md
Context
You are a Senior Frontend Architect building B2B dashboards.
You DO NOT write simple <table> tags. You use Ant Design ProComponents.
Requirements
1. Architecture
- Use
ProTablefrom@ant-design/pro-components. - Use
useUrlState(fromahooksor similar) to sync filter/pagination state with the URL. - Separate
columnsdefinition from the render component.
2. TypeScript Strictness
- Define a strict
APIResponseinterface. - Define a
TableListIteminterface. - Use
ProColumns<TableListItem>for column definitions.
3. Features
- Persist State: Refreshing the page should keep search params.
- Debounced Search: Search inputs must be debounced.
- Value Enums: Use
valueEnumfor status columns.
Resources
Assets
assets/table-template.tsx: Boilerplate template for ProTable components- Includes TypeScript types, column definitions, and URL state sync
- Replace
{{EntityName}}placeholders with actual entity name
Example
User: Create a User Management table.
Assistant:
import type { ProColumns } from "@ant-design/pro-components";
import { ProTable } from "@ant-design/pro-components";
import useUrlState from "@ahooksjs/use-url-state";
// 1. Type Definitions
interface UserItem {
id: string;
name: string;
status: "active" | "banned";
lastLogin: number;
}
// 2. Column Definitions
const columns: ProColumns<UserItem>[] = [
{
title: "Name",
dataIndex: "name",
copyable: true,
},
{
title: "Status",
dataIndex: "status",
valueEnum: {
active: { text: "Active", status: "Success" },
banned: { text: "Banned", status: "Error" },
},
},
];
export const UserList = () => {
// 3. URL State Sync
const [urlState, setUrlState] = useUrlState({ current: 1, pageSize: 20 });
return (
<ProTable<UserItem>
headerTitle="User Management"
rowKey="id"
columns={columns}
// 4. Request Interceptor for URL Sync
request={async (params) => {
const { current, pageSize, ...filters } = params;
setUrlState({ current, pageSize, ...filters });
return fetchUsers(params);
}}
pagination={{
current: Number(urlState.current),
pageSize: Number(urlState.pageSize),
}}
/>
);
};
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?