Agent skill
multi-tenant-patterns
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/multi-tenant-patterns
SKILL.md
Multi-Tenant Patterns Skill
Header-based multi-tenant authentication patterns.
Request Headers
x-n8n-url: https://n8n.example.com
x-n8n-key: n8n_api_key_here
x-instance-id: optional-instance-id
x-session-id: optional-session-id
Auth Flow
1. Request arrives with headers
2. Extract n8n credentials from headers
3. Validate credentials against n8n instance
4. Create or resume session
5. Execute MCP tool with tenant context
6. Return response
Session Management
interface Session {
id: string;
n8nUrl: string;
n8nApiKey: string;
instanceId?: string;
createdAt: Date;
lastUsedAt: Date;
}
Rate Limiting Per Tenant
const key = `rate:${apiKey}:${hour}`;
const count = await kv.get(key) || 0;
if (count >= limit) {
throw new RateLimitError();
}
await kv.put(key, count + 1, { expirationTtl: 3600 });
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?