1

    Author, harden, and debug systemd units for production services and scheduled tasks.

    Free

    5 usesSecurity scanned

    Works with the AI Agents you already use

    systemd

    Example session with this skill installed

    I need a systemd service file for a Node.js app at /opt/api/server.js running as 'apiuser'. It needs to restart on failure, use 2GB max RAM, and have strict security hardening.

    • Read your context and instructions
    • Compiled the systemd

    I have generated a hardened systemd service unit for your Node.js application. This configuration includes automatic restarts, resource limits, and filesystem isolation.

    systemd Service Configuration

    [Unit]
    Description=Node.js API Server
    After=network.target
    
    [Service]
    Type=simple
    User=apiuser
    Group=apiuser
    WorkingDirectory=/opt/api
    ExecStart=/usr/bin/node /opt/api/server.js
    
    # Restart policy
    Restart=on-failure
    RestartSec=5s
    
    # Resource Limits
    MemoryMax=2G
    LimitNOFILE=65535
    
    # Security Hardening
    PrivateTmp=true
    NoNewPrivileges=true
    ProtectSystem=strict
    ProtectHome=true
    PrivateDevices=true
    ProtectKernelTunables=true
    ProtectControlGroups=true
    RestrictNamespaces=true
    
    # Allow writing to specific application paths if needed
    # ReadWritePaths=/var/log/api-app
    
    [Install]
    WantedBy=multi-user.target
    

    Next steps

    1. Save this content to /etc/systemd/system/api-server.service.
    2. Run sudo systemctl daemon-reload to register the new unit.
    3. Start and enable the service with sudo systemctl enable --now api-server.service.

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

    About this skill

    The problem

    Managing Linux services manually via scripts is error-prone and lacks native recovery, resource limits, and unified logging. Developers often struggle with correct unit file syntax, leading to services that fail to restart on crash or leak privileges.

    What it does

    • Generates hardened systemd service units for Node.js, Python, and Go applications.
    • Configures timer units with cron-like scheduling and persistence for background tasks.
    • Implements security best practices like PrivateTmp, NoNewPrivileges, and ProtectSystem.
    • Sets up socket activation to start services only when traffic arrives.
    • Manages drop-in overrides to modify package-provided units without touching original files.

    Frameworks & tools

    Linux distributions using systemd (Ubuntu, Debian, CentOS, Fedora, RHEL), journalctl, and systemctl.

    Why this beats prompting it yourself

    Generic LLMs often forget to include essential Restart logic or LimitNOFILE settings required for production-grade stability. This skill enforces a security-first approach, ensuring every service is isolated and monitored correctly from the start.

    Use cases

    • Deploying a Node.js API with automatic restarts and logging to the system journal.
    • Replacing fragile cron jobs with reliable systemd timers and randomized delays.
    • Hardening an existing public-facing service to prevent filesystem access.
    • Debugging startup failures using journalctl filtering and boot-level logs.

    Known limitations

    Does not support non-systemd init systems like OpenRC (Alpine Linux) or macOS launchd. Focuses on system management, not container orchestration like Docker.

    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

    5 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill automates the creation of robust, production-ready systemd unit files, ensuring your Linux services include critical security hardening, automatic restart logic, and proper resource limits by default.

    It is compatible with any modern Linux distribution using systemd, including Ubuntu, Debian, CentOS, Fedora, and RHEL. It does not support alternative init systems like OpenRC or macOS launchd.

    Yes, the skill is designed to analyze existing units and generate drop-in overrides or hardened configurations to restrict filesystem access and prevent privilege escalation.

    Beyond standard services, it manages timer units for scheduled tasks, socket activation for traffic-triggered starts, and journalctl integration for streamlined log management.

    The skill provides the necessary configurations and commands for your AI agent to implement directly on your host; it does not require additional software installation on your Linux server.

    New in DevOps & Cloud

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

    Free