Agent skill

Maintainx Security Basics

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Configure MaintainX API security, credential management, and access control.

MITAuto-check: notesBackend & APIs

Install Maintainx Security Basics

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill maintainx-security-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace maintainx-security-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/maintainx-security-basics .claude/skills/maintainx-security-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
maintainx-security-basics
GitHub stars
2.8k
Token cost
~1.7k tokens
SKILL.md length
209 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure MaintainX API security, credential management, and access control.

  • Works in 5 steps: Secure Credential Storage → Git Hook to Prevent Secret Commits → Input Validation → …
  • Securing API keys
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Calls npx; reaches api.getmaintainx.com; needs MAINTAINX_API_KEY and API_KEY

What it does

Maintainx Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure MaintainX API security, credential management, and access control. Use when securing API keys, implementing access controls, or hardening your MaintainX integration. Trigger with phrases like "maintainx security", "maintainx api key security", "secure maintainx", "maintainx credentials", "maintainx access control".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/implementation-guide.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Authorization and RBAC. It works with Git and Zod. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Securing API keys
  • Implementing access controls
  • Hardening your MaintainX integration
  • With phrases like maintainx security

Example prompts

  • “maintainx security”
  • “maintainx api key security”
  • “secure maintainx”
  • “/maintainx-security-basics”

Requirements

  • Node.js
  • A credential in MAINTAINX_API_KEY
  • A credential in API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*)

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Secure Credential Storage
  2. Git Hook to Prevent Secret Commits
  3. Input Validation
  4. Audit Logging
  5. API Key Rotation

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.getmaintainx.com

    Also links to:

    • getmaintainx.com
    • owasp.org
    • github.com
    • zod.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • MAINTAINX_API_KEY
    • API_KEY
    • NEW_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Maintainx Security Basics loads about 1.7k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 209 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:45
    # .env (never committed to git)
  • NoteMentions a .env fileSKILL.md:49
    .env
  • NoteMentions a .env fileSKILL.md:50
    .env.*
  • NoteMentions a .env fileSKILL.md:193
    Update the key in your secret manager / .env');
  • NoteMentions a .env fileSKILL.md:209
    - `.env` with API key, protected by `.gitignore`
  • NoteMentions a .env fileSKILL.md:219
    | Key leaked to git | Committed `.env` or hardcoded key | Rotate immediately, add pre-commit hook |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 209 words, ~1,716 tokens.

Download SKILL.mdSave it as .claude/skills/maintainx-security-basics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
maintainx-security-basics
description
Configure MaintainX API security, credential management, and access control. Use when securing API keys, implementing access controls, or hardening your MaintainX integration. Trigger with phrases like "maintainx security", "maintainx api key security", "secure maintainx", "maintainx credentials", "maintainx access control".
allowed-tools
Read, Write, Edit, Bash(npm:*)
compatibility
Designed for Claude Code
version
1.11.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, maintainx, api, security

MaintainX Security Basics

Overview

Secure your MaintainX integration with proper credential management, input validation, audit logging, and key rotation procedures.

Prerequisites

  • MaintainX account with admin access
  • Node.js 18+
  • Familiarity with environment variables and secret management

Instructions

Step 1: Secure Credential Storage

Never hardcode API keys. Use environment variables or a secret manager.

bash
# .env (never committed to git)
MAINTAINX_API_KEY=mx-prod-key-here

# .gitignore
.env
.env.*
*.key
typescript
// src/config.ts - load and validate credentials
import 'dotenv/config';

const REQUIRED_VARS = ['MAINTAINX_API_KEY'] as const;

export function validateEnv() {
  const missing = REQUIRED_VARS.filter((v) => !process.env[v]);
  if (missing.length > 0) {
    throw new Error(`Missing required env vars: ${missing.join(', ')}`);
  }
}

validateEnv();
export const API_KEY = process.env.MAINTAINX_API_KEY!;
Step 2: Git Hook to Prevent Secret Commits
bash
# Install pre-commit hook
cat > .git/hooks/pre-commit << 'HOOK'
#!/bin/bash
# Block commits containing API keys
if git diff --cached --diff-filter=ACMR | grep -qiE '(MAINTAINX_API_KEY|Bearer mx-)'; then
  echo "ERROR: Potential MaintainX API key detected in staged files."
  echo "Remove secrets before committing."
  exit 1
fi
HOOK
chmod +x .git/hooks/pre-commit

Or use gitleaks:

bash
npx gitleaks detect --source . --no-git
Step 3: Input Validation

Validate all user input before sending to the MaintainX API:

typescript
// src/validation.ts
import { z } from 'zod';

const WorkOrderInput = z.object({
  title: z.string().min(1).max(500),
  description: z.string().max(5000).optional(),
  priority: z.enum(['NONE', 'LOW', 'MEDIUM', 'HIGH']).default('NONE'),
  status: z.enum(['OPEN', 'IN_PROGRESS', 'ON_HOLD', 'COMPLETED', 'CLOSED']).default('OPEN'),
  assignees: z.array(z.object({
    type: z.enum(['USER', 'TEAM']),
    id: z.number().positive(),
  })).optional(),
  assetId: z.number().positive().optional(),
  locationId: z.number().positive().optional(),
  dueDate: z.string().datetime().optional(),
});

export function validateWorkOrder(input: unknown) {
  return WorkOrderInput.parse(input);
}

// Usage
try {
  const validated = validateWorkOrder(userInput);
  await client.createWorkOrder(validated);
} catch (err) {
  if (err instanceof z.ZodError) {
    console.error('Validation failed:', err.issues);
  }
}
Step 4: Audit Logging
typescript
// src/audit-logger.ts
interface AuditEntry {
  timestamp: string;
  action: string;
  resource: string;
  resourceId?: number;
  userId: string;
  ip?: string;
  result: 'success' | 'failure';
  details?: string;
}

class AuditLogger {
  private entries: AuditEntry[] = [];

  log(entry: Omit<AuditEntry, 'timestamp'>) {
    const full: AuditEntry = { ...entry, timestamp: new Date().toISOString() };
    this.entries.push(full);
    // Structured JSON for log aggregation (ELK, CloudWatch, etc.)
    console.log(JSON.stringify({ type: 'audit', ...full }));
  }
}

export const audit = new AuditLogger();

// Usage in API wrapper
async function createWorkOrderAudited(client: MaintainXClient, input: any, userId: string) {
  try {
    const wo = await client.createWorkOrder(input);
    audit.log({
      action: 'workorder.create',
      resource: 'workorder',
      resourceId: wo.id,
      userId,
      result: 'success',
    });
    return wo;
  } catch (err: any) {
    audit.log({
      action: 'workorder.create',
      resource: 'workorder',
      userId,
      result: 'failure',
      details: err.message,
    });
    throw err;
  }
}
Step 5: API Key Rotation
typescript
// scripts/rotate-key.ts
// Run quarterly: npx tsx scripts/rotate-key.ts

async function rotateApiKey() {
  console.log('=== MaintainX API Key Rotation ===');
  console.log('1. Go to https://app.getmaintainx.com > Settings > Integrations');
  console.log('2. Click "Generate New Key"');
  console.log('3. Update the key in your secret manager / .env');
  console.log('4. Verify with: curl -s -o /dev/null -w "%{http_code}" \\');
  console.log('     https://api.getmaintainx.com/v1/users?limit=1 \\');
  console.log('     -H "Authorization: Bearer NEW_KEY"');
  console.log('5. Revoke the old key in MaintainX Settings');
  console.log('6. Update CI/CD secrets (GitHub Actions, GCP Secret Manager)');
  console.log('');
  console.log('Rotation schedule: every 90 days');
  console.log('Next rotation due:', new Date(Date.now() + 90 * 86400000).toISOString().split('T')[0]);
}

rotateApiKey();

Output

  • .env with API key, protected by .gitignore
  • Pre-commit hook blocking secret leaks
  • Zod-based input validation for all API inputs
  • Structured audit logging for compliance
  • Key rotation procedure with verification steps

Error Handling

IssueCauseSolution
Key leaked to gitCommitted .env or hardcoded keyRotate immediately, add pre-commit hook
Validation errorsInvalid user inputUse Zod schema to validate before API calls
Audit gapsMissing log entriesWrap all API calls with audit logger
Stale keyKey not rotated in > 90 daysFollow rotation procedure in Step 5

Resources

Next Steps

For production deployment, see maintainx-prod-checklist.

Examples

Middleware for Express API that validates and audits:

typescript
function secureEndpoint(schema: z.ZodSchema) {
  return async (req: express.Request, res: express.Response, next: express.NextFunction) => {
    try {
      req.body = schema.parse(req.body);
      audit.log({
        action: req.method + ' ' + req.path,
        resource: req.path,
        userId: req.headers['x-user-id'] as string,
        result: 'success',
      });
      next();
    } catch (err) {
      res.status(400).json({ error: 'Validation failed', details: (err as z.ZodError).issues });
    }
  };
}

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/maintainx-security-basics of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/implementation-guide.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Maintainx Security Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Maintainx Security Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Maintainx Security Basics this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.7kAutomated safety check: NotesMIT
API Route Patternsbybren-llc/safe-agentic-workflow423—~1.6kAutomated safety check: PassMIT
Manage Dashboard WidgetsPostHog/posthog40k—~2.3kAutomated safety check: PassCustom licence
Hunt Spa APIelementalsouls/Claude-BugHunter4.8k—~2.2kAutomated safety check: NotesMIT
Nuxt Contentsecondsky/claude-skills227—~4.3kAutomated safety check: PassMIT
Frontmcp Testingagentfront/frontmcp146—~10kAutomated safety check: NotesApache-2.0

Similar skills

  • API Route Patterns

    bybren-llc/safe-agentic-workflow

    API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side…

    423 GitHub stars~1.6k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Official

    Guides PostHog engineers through dashboard widget platform work — ship a new widgettype (WIDGETREGISTRY, catalog, runwidgets, WidgetCard) or update a shipped type (config, query, layout, RBAC, tile…

    40k GitHub stars~2.3k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Hunt Spa API

    elementalsouls/Claude-BugHunter

    Discover a single-page-app's hidden backend API from its public JS bundle, then test that API for broken access control / missing authentication.

    4.8k GitHub stars~2.2k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Nuxt Content

    secondsky/claude-skills

    Nuxt Content v3 Git-based CMS for Markdown/MDC content sites.

    227 GitHub stars~4.3k tokensUpdated 13 days ago
    Frontend & DesignAuto-check passed
  • Frontmcp Testing

    agentfront/frontmcp

    A skill your agent uses for anything about testing FrontMCP servers: writing or running unit, integration, and E2E tests and reaching the 95%+ coverage bar.

    146 GitHub stars~10k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Delivery Lifecycle Maintainer

    Undertone0809/rudder

    Coordinate complex Rudder delivery when concurrent integration, runtime/data identity, or release gates require a machine-readable evidence packet.

    292 GitHub stars~2.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Maintainx Security Basics

What does Maintainx Security Basics do?

Configure MaintainX API security, credential management, and access control. Maintainx Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure MaintainX API security, credential management, and access control.

When should I use Maintainx Security Basics?

Maintainx Security Basics fits situations like: securing API keys; implementing access controls; hardening your MaintainX integration; with phrases like maintainx security.

How do I install Maintainx Security Basics in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill maintainx-security-basics -a claude-code`. Or copy the skill folder (skills/.curated/maintainx-security-basics in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/maintainx-security-basics in your project. Claude Code loads it when a task matches its description.

How do I install Maintainx Security Basics in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill maintainx-security-basics -a codex`. Or copy the skill folder (skills/.curated/maintainx-security-basics in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/maintainx-security-basics in your project. Codex loads it when a task matches its description.

Can I use Maintainx Security Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill maintainx-security-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/maintainx-security-basics, .gemini/skills/maintainx-security-basics, .github/skills/maintainx-security-basics and .opencode/skills/maintainx-security-basics in your project.

What does Maintainx Security Basics need to run?

Going by SKILL.md and its folder, Maintainx Security Basics needs the command-line tools its instructions call (npx) and credentials named MAINTAINX_API_KEY, API_KEY and NEW_KEY. Our summary lists: Node.js; A credential in MAINTAINX_API_KEY; A credential in API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Maintainx Security Basics access the network?

SKILL.md names 5 domains. In commands or code: api.getmaintainx.com; the agent is likely to contact it when it follows the instructions. As links in the text: getmaintainx.com, owasp.org, github.com and zod.dev. This is read from the text; nothing was executed.

Is Maintainx Security Basics safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Maintainx Security Basics use?

Maintainx Security Basics is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Maintainx Security Basics use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to Maintainx Security Basics?

Skills that share tags, products or a category with Maintainx Security Basics: API Route Patterns (bybren-llc/safe-agentic-workflow, 423 stars), Manage Dashboard Widgets (PostHog/posthog, 40k stars), Hunt Spa API (elementalsouls/Claude-BugHunter, 4.8k stars) and Nuxt Content (secondsky/claude-skills, 227 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Maintainx Security Basics?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.