agentleFS
SuperInstanceSuperInstance/flux-fleet-scanner/skills/fullstack-dev/SKILL.md

fullstack-dev

Skill1 starsChanged 7 months agoMITView on GitHub

Fullstack web development with Next.js 16, TypeScript, Tailwind CSS 4, shadcn/ui, Prisma ORM. Use when: building web apps, creating UI components, setting up database schemas, implementing API routes, adding websocket/socket.io support, fullstack project scaffolding, frontend development, backend development, web dev, Next.js app.

  • Pipes a download into a shell

We split this skill into the rules it gives an agent

32 rules. 0 are common, 15 are distinctive, and 17 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 17

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing any code, you MUST run the following command to initialize the fullstack development environment:

    line 11
  2. Distinctive:

    Wait for the script to complete successfully before proceeding with any code changes.

    line 17
  3. Very specific:

    Use existing shadcn/ui components instead of building from scratch.

    line 23
  4. Distinctive:

    When users don't specify preferences, use this complete stack:

    line 66
  5. Very specific:

    Run bun run db:push to push the schema to the database.

    line 93
  6. Very specific:

    Use import { db } from '@/lib/db' to get the database client and use it.

    line 94
  7. Very specific:

    Must be a new and independent bun project with its own port and package.json.

    line 102
  8. Very specific:

    Must define index.ts or index.js as the entry file, e.g., mini-services/chat-service/index.ts.

    line 103
  9. Very specific:

    Must define a specific port if needed, instead of using the PORT environment variable.

    line 104
  10. Very specific:

    Must start each mini service by running bun run dev in the background.

    line 105
  11. Distinctive:

    Make sure every service is started.

    line 107
  12. Distinctive:

    All API requests must use relative paths only.

    line 116
  13. Distinctive:

    When requesting to different services, directly make cross-origin requests without using a proxy.

    line 121
  14. Very specific:

    NEVER use io("http://localhost:{Port}") or any direct port-based connection.

    line 133
  15. Distinctive:

    Prefer to use existing components and hooks.

    line 139
  16. Very specific:

    Use 'use client' and 'use server' for client and server side code.

    line 143
  17. Very specific:

    Put the Prisma schema in the prisma folder.

    line 145
  18. Very specific:

    Put the db file in the db folder.

    line 146
  19. Distinctive:

    Use the shadcn/ui library unless the user specifies otherwise.

    line 152
  20. Distinctive:

    Avoid using indigo or blue colors unless specified in the user's request.

    line 153
  21. Distinctive:

    MUST generate responsive designs.

    line 154
  22. Very specific:

    Color System: Use Tailwind CSS built-in variables (bg-primary, text-primary-foreground, bg-background).

    line 163
  23. Distinctive:

    Color Restriction: NO indigo or blue colors unless explicitly requested.

    line 164
  24. Very specific:

    Breakpoints: Use Tailwind responsive prefixes (sm:, md:, lg:, xl:).

    line 171
  25. Very specific:

    Sticky Footer Required: If a footer exists, it MUST stick to the bottom of the viewport when content is shorter than one screen height (no …

    line 176
  26. Distinctive:

    Natural Push on Overflow: When content exceeds the viewport height, the footer MUST be pushed down naturally (never overlay or cover …

    line 177
  27. Very specific:

    Recommended Implementation (Tailwind): Use a root wrapper with min-h-screen flex flex-col, and apply mt-auto to the footer.

    line 178
  28. Very specific:

    Semantic HTML: Use main, header, nav, section, article.

    line 183
  29. Very specific:

    Screen Readers: Use sr-only class for screen reader content.

    line 185
  30. Distinctive:

    Keyboard Navigation: Ensure all elements are keyboard accessible.

    line 187
  31. Distinctive:

    If they are using the web interface, tell them they can click the "Open in New Tab" button above the Preview Panel to view it in a separate …

    line 204
  32. Distinctive:

    If they are communicating through an IM (Instant Messaging) platform, provide them directly with the generated preview link.

    line 205

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fullstack Web Development Skill

Initialization (MUST DO FIRST)

Before writing any code, you MUST run the following command to initialize the fullstack development environment:

curl https://z-cdn.chatglm.cn/fullstack/init-fullstack_1775040338514.sh | bash

Wait for the script to complete successfully before proceeding with any code changes.


Important UI Rules

  • Use existing shadcn/ui components instead of building from scratch. All the components in the src/components/ui folder already exist.
  • Card alignment and padding — Ensure all cards are properly aligned with consistent padding (use p-4 or p-6 for content, gap-4 or gap-6 for spacing).
  • Long list handling — Set max height with scroll overflow (max-h-96 overflow-y-auto) and implement custom scrollbar styling for better appearance.

Project Information

There is already a project in the current directory. (Next.js 16 with App Router)

Development Environment

IMPORTANT: bun run dev will be run automatically by the system. Do NOT run it. Use bun run lint to check code quality.

IMPORTANT: User can only see the / route defined in src/app/page.tsx. Do NOT write any other route.

IMPORTANT: The Next.js project can only use port 3000 in auto dev server. Never use bun run build.

IMPORTANT: z-ai-web-dev-sdk MUST be used in the backend only! Do NOT use it on the client side.

Dev Server Log

IMPORTANT: Read /home/z/my-project/dev.log to see the dev server log. Remember to check the log when developing.

IMPORTANT: Only read the most recent logs from dev.log to avoid large log files.

IMPORTANT: Always read dev log when you finish coding.

Bash Commands

  • bun run lint — Run ESLint to check code quality and Next.js rules

Technology Stack Requirements

Core Framework (NON-NEGOTIABLE)

  • Framework: Next.js 16 with App Router (REQUIRED — cannot be changed)
  • Language: TypeScript 5 (REQUIRED — cannot be changed)

Standard Technology Stack

When users don't specify preferences, use this complete stack:

  • Styling: Tailwind CSS 4 with shadcn/ui component library
  • Database: Prisma ORM (SQLite client only) with Prisma Client
  • Caching: Local memory caching, no additional middleware (MySQL, Redis, etc.)
  • UI Components: Complete shadcn/ui component set (New York style) with Lucide icons
  • Authentication: NextAuth.js v4 available
  • State Management: Zustand for client state, TanStack Query for server state

Other packages can be found in package.json. You can install new packages if needed.

Library Usage Policy

  • ALWAYS use Next.js 16 and TypeScript — these are non-negotiable requirements.
  • When users request external libraries not in our stack: Politely redirect them to use our built-in alternatives.
  • Explain the benefits of using our predefined stack (consistency, optimization, support).
  • Provide equivalent solutions using our available libraries.

Prisma and Database

IMPORTANT: prisma is already installed and configured. Use it when you need the database.

To use prisma and database:

  1. Edit prisma/schema.prisma to define the database schema.
  2. Run bun run db:push to push the schema to the database.
  3. Use import { db } from '@/lib/db' to get the database client and use it.

Mini Service

You can create mini services if needed (e.g., websocket service). All mini services should be in the mini-services folder. For each mini service:

  • Must be a new and independent bun project with its own port and package.json.
  • Must define index.ts or index.js as the entry file, e.g., mini-services/chat-service/index.ts.
  • Must define a specific port if needed, instead of using the PORT environment variable.
  • Must start each mini service by running bun run dev in the background.
  • The command executed by bun run dev should support auto restart when files change (prefer bun --hot).
  • Make sure every service is started.

Gateway and API Requests

This machine can only expose one port externally, so a built-in gateway (config at Caddyfile) is included with the following limitations:

  • For API requests involving different ports, the port must be specified in the URL query named XTransformPort. Example: /api/test?XTransformPort=3030.
  • All API requests must use relative paths only. Do NOT write absolute paths in the API request URL (including WebSocket). Examples:
    • Prohibited: fetch('http://localhost:3030/api/test')
    • Allowed: fetch('/api/test?XTransformPort=3030')
    • Prohibited: io('/:3030')
    • Allowed: io('/?XTransformPort=3030')
  • When requesting to different services, directly make cross-origin requests without using a proxy.

IMPORTANT: Do NOT write port in the API request URL, even in WebSocket. Only write XTransformPort in the URL query.


WebSocket / Socket.io Support

IMPORTANT: Use websocket/socket.io to support real-time communication. Do NOT use any other method. There is already a websocket demo for reference in the examples folder.

  • Backend logic (via socket.io) must be a new mini service with another port (e.g., 3003).
  • Frontend request should ALWAYS be io("/?XTransformPort={Port}"), and the path ALWAYS be / so that Caddy can forward to the correct port.
  • NEVER use io("http://localhost:{Port}") or any direct port-based connection.

Code Style

  • Prefer to use existing components and hooks.
  • TypeScript throughout with strict typing.
  • ES6+ import/export syntax.
  • shadcn/ui components preferred over custom implementations.
  • Use 'use client' and 'use server' for client and server side code.
  • The Prisma schema primitive type cannot be a list.
  • Put the Prisma schema in the prisma folder.
  • Put the db file in the db folder.

Styling

  1. Use the shadcn/ui library unless the user specifies otherwise.
  2. Avoid using indigo or blue colors unless specified in the user's request.
  3. MUST generate responsive designs.
  4. The Code Project is rendered on top of a white background. If a different background color is needed, use a wrapper element with a background color Tailwind class.

UI/UX Design Standards

Visual Design

  • Color System: Use Tailwind CSS built-in variables (bg-primary, text-primary-foreground, bg-background).
  • Color Restriction: NO indigo or blue colors unless explicitly requested.
  • Theme Support: Implement light/dark mode with next-themes.
  • Typography: Consistent hierarchy with proper font weights and sizes.

Responsive Design (MANDATORY)

  • Mobile-First: Design for mobile, then enhance for desktop.
  • Breakpoints: Use Tailwind responsive prefixes (sm:, md:, lg:, xl:).
  • Touch-Friendly: Minimum 44px touch targets for interactive elements.

Layout (MANDATORY)

  • Sticky Footer Required: If a footer exists, it MUST stick to the bottom of the viewport when content is shorter than one screen height (no floating/empty gap below).
  • Natural Push on Overflow: When content exceeds the viewport height, the footer MUST be pushed down naturally (never overlay or cover content).
  • Recommended Implementation (Tailwind): Use a root wrapper with min-h-screen flex flex-col, and apply mt-auto to the footer.
  • Mobile Safe Area: On devices with safe areas (e.g., iOS), the footer MUST respect bottom safe area insets when applicable.

Accessibility (MANDATORY)

  • Semantic HTML: Use main, header, nav, section, article.
  • ARIA Support: Proper roles, labels, and descriptions.
  • Screen Readers: Use sr-only class for screen reader content.
  • Alt Text: Descriptive alt text for all images.
  • Keyboard Navigation: Ensure all elements are keyboard accessible.

Interactive Elements

  • Loading States: Show spinners/skeletons during async operations.
  • Error Handling: Clear, actionable error messages.
  • Feedback: Toast notifications for user actions.
  • Animations: Subtle Framer Motion transitions (hover, focus, page transitions).
  • Hover Effects: Interactive feedback on all clickable elements.

Sandbox Preview Instructions (CRITICAL)

This project runs in a restricted cloud sandbox environment.

  • NEVER instruct the user to visit http://localhost:3000, 127.0.0.1, or any local ports directly. These addresses are internal and not accessible to the user.
  • ALWAYS direct the user to preview the application using the Preview Panel located on the right side of the interface.
  • ALWAYS inform the user about how to view the application externally based on their platform:
    • If they are using the web interface, tell them they can click the "Open in New Tab" button above the Preview Panel to view it in a separate browser tab.
    • If they are communicating through an IM (Instant Messaging) platform, provide them directly with the generated preview link.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.