Skip to content

SIDDARTHA577/envguard-node / .agents/skills/envguard-load-test

envguard-load-test

Verified

Guides capacity planning, workload profile design, local performance benchmarking, and threshold validation without fabricating production metrics or executing unauthorized traffic.

FileKindSize
SKILL.mdskill md7.7 KB
scripts/readiness-auditor.mjsscript27.1 KB
scripts/readiness/adapters/android-adapter.mjsscript30.0 KB
scripts/readiness/adapters/base-adapter.mjsscript4.6 KB
scripts/readiness/adapters/flutter-adapter.mjsscript28.9 KB
scripts/readiness/adapters/generic-adapter.mjsscript15.9 KB
scripts/readiness/adapters/index.mjsscript661 B
scripts/readiness/adapters/ios-adapter.mjsscript21.0 KB
scripts/readiness/adapters/java-spring-adapter.mjsscript39.9 KB
scripts/readiness/adapters/nextjs-react-adapter.mjsscript30.5 KB
scripts/readiness/adapters/node-typescript-adapter.mjsscript115.8 KB
scripts/readiness/adapters/python-adapter.mjsscript44.0 KB
scripts/readiness/adapters/react-native-adapter.mjsscript34.6 KB
scripts/readiness/adapters/registry.mjsscript3.7 KB
scripts/readiness/architecture/applicability.mjsscript21.8 KB
scripts/readiness/architecture/architecture-inventory.mjsscript16.9 KB
scripts/readiness/architecture/architecture-reporter.mjsscript9.4 KB
scripts/readiness/architecture/capacity-model.mjsscript16.9 KB
scripts/readiness/architecture/design-decisions.mjsscript42.0 KB
scripts/readiness/architecture/failure-modes.mjsscript13.3 KB
scripts/readiness/architecture/index.mjsscript895 B
scripts/readiness/architecture/requirements.mjsscript22.0 KB
scripts/readiness/architecture/tradeoffs.mjsscript4.5 KB
scripts/readiness/capacity/benchmark-runner.mjsscript13.4 KB
scripts/readiness/constants.mjsscript6.0 KB
scripts/readiness/deployment/cicd-gate-validator.mjsscript6.1 KB
scripts/readiness/deployment/container-validator.mjsscript10.1 KB
scripts/readiness/deployment/deployment-gate.mjsscript4.8 KB
scripts/readiness/deployment/index.mjsscript411 B
scripts/readiness/deployment/k8s-validator.mjsscript8.8 KB
scripts/readiness/deployment/reliability-validator.mjsscript9.4 KB
scripts/readiness/engine/discovery.mjsscript15.4 KB
scripts/readiness/engine/index.mjsscript341 B
scripts/readiness/engine/orchestrator.mjsscript21.0 KB
scripts/readiness/engine/planner.mjsscript4.2 KB
scripts/readiness/engine/sarif.mjsscript12.7 KB
scripts/readiness/engine/skills-selector.mjsscript10.0 KB
scripts/readiness/execution/git.mjsscript2.3 KB
scripts/readiness/execution/runner.mjsscript11.9 KB
scripts/readiness/index.mjsscript516 B
scripts/readiness/orchestration/engineering-workflow.mjsscript18.5 KB
scripts/readiness/orchestration/index.mjsscript170 B
scripts/readiness/policies/index.mjsscript189 B
scripts/readiness/policies/release-policy.mjsscript9.5 KB
scripts/readiness/remediation/checkpoint-manager.mjsscript34.0 KB
scripts/readiness/remediation/diff-viewer.mjsscript2.5 KB
scripts/readiness/remediation/index.mjsscript778 B
scripts/readiness/remediation/patch-generator.mjsscript17.5 KB
scripts/readiness/remediation/remediation-runner.mjsscript9.9 KB
scripts/readiness/reporters/comparator.mjsscript20.7 KB
scripts/readiness/reporters/index.mjsscript293 B
scripts/readiness/reporters/json-reporter.mjsscript193 B
scripts/readiness/reporters/markdown-reporter.mjsscript18.8 KB
scripts/readiness/validation/evidence-matrix.mjsscript21.5 KB
scripts/readiness/validation/independent-app-runner.mjsscript26.2 KB
scripts/readiness/validation/index.mjsscript328 B

scripts/readiness/engine/skills-selector.mjs

View on GitHub
/**
 * Skill Selection and Prioritization Engine for EnvGuard.
 * Evaluates repository inventory, platforms, and detected technologies to dynamically
 * recommend, prioritize, and sequence applicable Agent Skills from the 18-skill catalog.
 */

export const SKILL_PRIORITIES = {
  P0: 'P0', // Foundation / Critical assessment
  P1: 'P1', // Platform & Domain hardening
  P2: 'P2', // Enhancement & Operational refinement
};

/**
 * Recommends and sequences Agent Skills based on project topology and technology stack.
 *
 * @param {object} inventory - Repository inventory graph from buildInventoryGraph()
 * @param {string[]} [files=[]] - List of relative project files
 * @returns {{ selectedSkills: Array<object>, executionSequence: string[] }}
 */
export function selectSkillsForProject(inventory = {}, files = []) {
  const applications = inventory.applications || [];
  const isMonorepo = Boolean(inventory.repository?.isMonorepo);
  const selected = [];

  // Technology & architecture detection helpers
  const allDeps = new Set();
  const allDevDeps = new Set();
  const allAppTypes = new Set();
  const allFrameworks = new Set();
  const allDatabases = new Set();
  const allLanguages = new Set();

  for (const app of applications) {
    if (app.type) allAppTypes.add(app.type);
    const deps = app.manifest?.dependencies || app.dependencies || {};
    const devDeps = app.manifest?.devDependencies || app.devDependencies || {};
    for (const d of Object.keys(deps)) allDeps.add(d);
    for (const d of Object.keys(devDeps)) allDevDeps.add(d);
    for (const fw of app.frameworks || []) allFrameworks.add(fw);
    for (const db of app.databases || []) allDatabases.add(db);
    for (const lang of app.languages || []) allLanguages.add(lang);
  }

  const hasMobile =
    allAppTypes.has('mobile') ||
    allAppTypes.has('react-native') ||
    allAppTypes.has('flutter') ||
    allAppTypes.has('android') ||
    allAppTypes.has('ios') ||
    allFrameworks.has('react-native') ||
    allFrameworks.has('expo') ||
    allFrameworks.has('flutter') ||
    allFrameworks.has('android-native') ||
    allFrameworks.has('ios-native') ||
    files.some(
      (f) =>
        f.startsWith('android/') ||
        f.startsWith('ios/') ||
        f.endsWith('pubspec.yaml') ||
        f.endsWith('App.tsx') ||
        f.endsWith('app.json')
    );

  const hasBackend =
    allAppTypes.has('backend') ||
    allAppTypes.has('fullstack') ||
    allAppTypes.has('service') ||
    allAppTypes.has('node-typescript') ||
    allAppTypes.has('python') ||
    allAppTypes.has('java') ||
    allLanguages.has('python') ||
    allLanguages.has('java') ||
    allFrameworks.has('express') ||
    allFrameworks.has('fastify') ||
    allFrameworks.has('nestjs') ||
    allFrameworks.has('koa') ||
    allFrameworks.has('django') ||
    allFrameworks.has('fastapi') ||
    allFrameworks.has('flask') ||
    allFrameworks.has('spring-boot') ||
    allDeps.has('express') ||
    allDeps.has('fastify') ||
    allDeps.has('nestjs') ||
    allDeps.has('@nestjs/core') ||
    allDeps.has('koa') ||
    files.some(
      (f) =>
        f.includes('server.') ||
        f.includes('app.') ||
        f.endsWith('manage.py') ||
        f.endsWith('pom.xml') ||
        f.endsWith('build.gradle')
    );

  const hasFrontend =
    allAppTypes.has('frontend') ||
    allAppTypes.has('fullstack') ||
    allAppTypes.has('nextjs-react') ||
    allFrameworks.has('react') ||
    allFrameworks.has('nextjs') ||
    allFrameworks.has('vite') ||
    allDeps.has('react') ||
    allDeps.has('next') ||
    allDeps.has('vue') ||
    allDeps.has('svelte') ||
    allDevDeps.has('vite') ||
    files.some((f) => f.includes('pages/') || f.includes('components/') || f.endsWith('index.html'));

  const hasDatabase =
    allDatabases.size > 0 ||
    allDeps.has('prisma') ||
    allDevDeps.has('prisma') ||
    allDeps.has('@prisma/client') ||
    allDeps.has('typeorm') ||
    allDeps.has('sequelize') ||
    allDeps.has('mongoose') ||
    allDeps.has('pg') ||
    allDeps.has('mysql2') ||
    allDeps.has('better-sqlite3') ||
    files.some((f) => f.includes('schema.prisma') || f.includes('migrations/') || f.includes('models/'));

  const hasMissingEnvExample = !files.some((f) => f === '.env.example' || f.endsWith('/.env.example'));
  const hasCI = files.some(
    (f) => f.startsWith('.github/') || f.includes('.gitlab-ci.yml') || f.includes('Dockerfile')
  );

  // 1. Foundation Skills (P0 - Always Selected)
  selected.push({
    name: 'envguard-production-readiness',
    pack: 'production',
    priority: SKILL_PRIORITIES.P0,
    reason: 'Comprehensive multi-platform production readiness audit covering configuration, security, builds, and reliability.',
    triggers: ['always_active', 'foundation_readiness'],
  });

  selected.push({
    name: 'envguard-senior-engineer-review',
    pack: 'production',
    priority: SKILL_PRIORITIES.P0,
    reason: 'Senior software architect review evaluating system design, ADRs, FMEA risk analysis, and capacity planning.',
    triggers: ['always_active', 'architecture_orchestration'],
  });

  selected.push({
    name: 'envguard-review',
    pack: 'core',
    priority: SKILL_PRIORITIES.P0,
    reason: 'Security analysis of environment variables, secret handling, gitignore rules, and credential leak risks.',
    triggers: ['always_active', 'security_audit'],
  });

  // 2. Setup & Environment Remediation Skills
  if (hasMissingEnvExample) {
    selected.push({
      name: 'envguard-setup',
      pack: 'core',
      priority: SKILL_PRIORITIES.P0,
      reason: 'No .env.example template detected. Automated generation of environment schema and safe template required.',
      triggers: ['missing_env_example'],
    });
  }

  selected.push({
    name: 'envguard-audit',
    pack: 'core',
    priority: SKILL_PRIORITIES.P1,
    reason: 'Scans codebase for environment variable lookups and recommends type-safe EnvGuard schemas.',
    triggers: ['configuration_audit'],
  });

  if (hasCI) {
    selected.push({
      name: 'envguard-ci',
      pack: 'core',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Existing CI/CD configuration detected. Integration of automated pre-flight readiness checks recommended.',
      triggers: ['ci_pipeline_detected'],
    });
  }

  // 3. Domain & Architecture Skills
  selected.push({
    name: 'envguard-system-design',
    pack: 'fullstack',
    priority: SKILL_PRIORITIES.P1,
    reason: 'System architecture selection, component boundaries, and Architecture Decision Records (ADRs).',
    triggers: ['system_architecture'],
  });

  selected.push({
    name: 'envguard-code-review',
    pack: 'fullstack',
    priority: SKILL_PRIORITIES.P1,
    reason: 'Rigorous peer code review for edge cases, performance bottlenecks, and architectural alignment.',
    triggers: ['code_quality_assurance'],
  });

  if (hasBackend) {
    selected.push({
      name: 'envguard-backend',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Backend API implementation with input validation, structured errors, and graceful shutdown.',
      triggers: ['backend_service_detected'],
    });
    selected.push({
      name: 'envguard-api-design',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Standardized RESTful API contracts with explicit HTTP semantics and RFC 7807 structured errors.',
      triggers: ['api_endpoints_detected'],
    });
    selected.push({
      name: 'envguard-load-test',
      pack: 'production',
      priority: SKILL_PRIORITIES.P2,
      reason: 'Capacity planning, workload scenario modeling, and safe local benchmarking for backend services.',
      triggers: ['load_testing_eligible'],
    });
  }

  if (hasFrontend) {
    selected.push({
      name: 'envguard-frontend',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Component-driven frontend implementation with strict state management and API integration.',
      triggers: ['frontend_ui_detected'],
    });
    selected.push({
      name: 'envguard-accessibility',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'WCAG AA standards, semantic HTML, keyboard navigation, and ARIA patterns.',
      triggers: ['accessibility_applicable'],
    });
    selected.push({
      name: 'envguard-ui-design',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P2,
      reason: 'Token-driven user interfaces with standardized typography and spacing scales.',
      triggers: ['ui_design_consistency'],
    });
  }

  if (hasDatabase) {
    selected.push({
      name: 'envguard-database',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Database schema design, composite index strategies, migrations, and connection pool optimization.',
      triggers: ['database_persistence_detected'],
    });
  }

  if (isMonorepo || (hasBackend && hasFrontend)) {
    selected.push({
      name: 'envguard-fullstack-integration',
      pack: 'fullstack',
      priority: SKILL_PRIORITIES.P1,
      reason: 'Full-stack integration connecting frontends, backends, and databases with shared TypeScript contracts.',
      triggers: ['cross_boundary_integration'],
    });
  }

  if (hasMobile) {
    selected.push({
      name: 'envguard-mobile-readiness',
      pack: 'production',
      priority: SKILL_PRIORITIES.P0,
      reason: 'Mobile application readiness assessment for React Native, Expo, Flutter, Android, and iOS aligned with OWASP MASVS.',
      triggers: ['mobile_platform_detected'],
    });
  }

  // Deduplicate and order by priority (P0 -> P1 -> P2), then by name
  const priorityOrder = { P0: 0, P1: 1, P2: 2 };
  const seen = new Set();
  const uniqueSelected = [];

  for (const s of selected) {
    if (!seen.has(s.name)) {
      seen.add(s.name);
      uniqueSelected.push(s);
    }
  }

  uniqueSelected.sort((a, b) => {
    const pDiff = (priorityOrder[a.priority] ?? 99) - (priorityOrder[b.priority] ?? 99);
    if (pDiff !== 0) return pDiff;
    return a.name.localeCompare(b.name);
  });

  return {
    selectedSkills: uniqueSelected,
    executionSequence: uniqueSelected.map((s) => s.name),
  };
}

finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 321kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 321kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 321kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall