Agency Admin CRM

    by Zeeonix Digital

    1

    Secure admin dashboard and lead CRM with RBAC, audit logs, and injection-protected CSV exports.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Agency Admin CRM

    Example session with this skill installed

    Scaffold the admin lead dashboard with RBAC and a CSV export route that prevents formula injection.

    • Read your context and instructions
    • Compiled the agency admin crm

    I have scaffolded the Admin Portal infrastructure. This includes the server-side RBAC middleware, the lead management API routes with audit logging, and the secure CSV export utility.

    Admin CRM Implementation

    API Route: Secure Lead Export

    // /app/api/admin/leads/export/route.ts
    import { NextResponse } from 'next/server';
    import { getServerSession } from 'next-auth';
    import { prisma } from '@/lib/prisma';
    import { authOptions } from '@/lib/auth';
    
    export async function GET() {
      const session = await getServerSession(authOptions);
      
      if (!session || session.user.role !== 'ADMIN') {
        return new NextResponse('Unauthorized', { status: 403 });
      }
    
      const leads = await prisma.lead.findMany({
        select: { email: true, name: true, status: true, score: true }
      });
    
      const headers = ['Name', 'Email', 'Status', 'Score'];
      
      // Apply formula injection protection
      const sanitize = (val: string | number) => {
        const str = String(val);
        return /^[=+\-@\t\r]/.test(str) ? `'${str}` : str;
      };
    
      const csvContent = [
        headers.join(','),
        ...leads.map(l => [
          sanitize(l.name),
          sanitize(l.email),
          sanitize(l.status),
          l.score
        ].join(','))
      ].join('\n');
    
      await prisma.auditLog.create({
        data: {
          action: 'LEADS_EXPORTED',
          userId: session.user.id,
          entity: 'LEAD'
        }
      });
    
      return new NextResponse(csvContent, {
        headers: {
          'Content-Type': 'text/csv',
          'Content-Disposition': 'attachment; filename=leads-export.csv'
        }
      });
    }
    

    Lead Pipeline Table Component

    FeatureImplementation DetailRole Access
    KPI CardsDisplays Total, Qualified, and Pipeline %VIEWER+
    Status UpdatePATCH /api/admin/leads/[id]MANAGER+
    Audit TrailLogs changes to LEAD_STATUS_UPDATEDADMIN
    CSV ExportSanitized output for Excel/SheetsADMIN

    Next steps

    1. Run npx prisma generate to ensure the AuditLog and Lead models are synced.
    2. Update your middleware.ts to include the new /admin route protection patterns.
    3. Test the CSV export with a lead name starting with = to verify sanitization.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Lead management often collapses into messy spreadsheets or insecure, improvised dashboards. This skill builds a hardened internal Admin Portal and CRM designed specifically for agency and SaaS teams to manage inbound leads and chat transcripts.

    What it does

    • Role-Based Access Control enforces strict permissions for ADMIN, MANAGER, and VIEWER roles across all pages and API routes.
    • Lead Pipeline Management provides a filterable interface to track leads from NEW to WON/LOST with scoring and source tracking.
    • Secure CSV Export generates lead reports with built-in protection against CSV formula-injection attacks.
    • Audit Logging records every status change, lead assignment, and export event for internal accountability.
    • Transcript Integration links leads to specific AI chat sessions for full context during follow-up.

    How it works

    1. Auth Verification checks your existing Auth.js or session implementation to wrap /admin routes in server-side guards.
    2. Schema Integration maps the lead, user, and audit log models using your Prisma schema.
    3. API Implementation builds paginated, validated CRUD endpoints for lead updates and internal notes.
    4. UI Scaffolding generates the dashboard KPI cards, filterable tables, and lead detail drawers.

    Frameworks & tools

    Built for TypeScript environments using Next.js (App Router), Prisma ORM, and Auth.js/NextAuth. It utilizes bcryptjs or argon2 for password security and Zod for schema validation.

    Why this beats prompting it yourself

    Writing secure RBAC and sanitizing CSV exports is tedious and error-prone. This skill ensures that sensitive lead data never leaks through unshielded API routes and that every administrative action is logged by default.

    Use cases

    • Building a protected dashboard to manage leads captured by an AI chatbot.
    • Adding a secure internal portal for sales managers to assign leads to team members.
    • Implementing a compliant audit trail for lead deletions and bulk exports.

    Known limitations

    Requires an existing Prisma schema and a functioning authentication provider to be present in the codebase. Does not include frontend styling for non-Tailwind projects.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    Software
    tscNode.jsPostgreSQLtypscript

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed8 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a hardened, internal-facing dashboard to manage leads, track AI chat transcripts, and export data securely, solving the problem of messy spreadsheets and unshielded admin routes.

    It is designed for TypeScript environments using Next.js (App Router), Prisma ORM, and Auth.js. You must have an existing database schema and authentication provider configured for the skill to integrate correctly.

    The skill includes a pre-built Role-Based Access Control (RBAC) system with ADMIN, MANAGER, and VIEWER roles, ensuring users only see or edit lead data permitted by their clearance level.

    The CSV export feature includes specific sanitization logic to prevent formula-injection attacks, ensuring that lead data containing malicious characters cannot execute code when opened in Excel or Google Sheets.

    Yes, the CRM is designed to link leads directly to their specific AI chat session transcripts, giving your sales team the full context of the conversation before they follow up.

    You receive the full implementation logic for the admin UI, protected API routes, Prisma model mappings, and the audit logging system, all ready to be integrated into your Next.js codebase.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.