From partme-ai-full-stack-skills
Guides Fastify development for high-performance Node.js APIs: routing, plugins, JSON Schema validation, hooks, serialization, error handling, and optimization.
npx claudepluginhub partme-ai/full-stack-skills --plugin t2ui-skillsThis skill uses the workspace's default tool permissions.
Use this skill whenever the user wants to:
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Use this skill whenever the user wants to:
fastify.inject() for testing, deploy with process managerconst fastify = require('fastify')({ logger: true });
// Register plugins
fastify.register(require('@fastify/cors'));
fastify.register(require('@fastify/helmet'));
// Route with JSON Schema validation
fastify.post('/api/items', {
schema: {
body: {
type: 'object',
required: ['name', 'price'],
properties: {
name: { type: 'string', minLength: 1 },
price: { type: 'number', minimum: 0 },
},
},
response: {
201: {
type: 'object',
properties: {
id: { type: 'integer' },
name: { type: 'string' },
price: { type: 'number' },
},
},
},
},
handler: async (request, reply) => {
const item = await createItem(request.body);
reply.code(201).send(item);
},
});
fastify.get('/api/items/:id', async (request, reply) => {
const item = await getItem(request.params.id);
if (!item) {
reply.code(404).send({ error: 'Not found' });
return;
}
return item;
});
fastify.listen({ port: 3000, host: '0.0.0.0' });
// plugins/db.js
async function dbPlugin(fastify, options) {
const pool = createPool(options.connectionString);
fastify.decorate('db', pool);
fastify.addHook('onClose', async () => pool.end());
}
module.exports = require('fastify-plugin')(dbPlugin);
// app.js
fastify.register(require('./plugins/db'), {
connectionString: process.env.DATABASE_URL,
});
fastify.setErrorHandler((error, request, reply) => {
request.log.error(error);
const statusCode = error.statusCode || 500;
reply.code(statusCode).send({
error: error.message,
statusCode,
});
});
fastify-plugin to break encapsulation when sharing decorators across scopesconsole.log in productiononRequest, preHandler) for cross-cutting concernsfastify.inject() without starting a serverfastify, Node.js, high performance, JSON schema, plugins, serialization, hooks, Pino logger