screen_lock

screen_lock is a skill for Claude Code, Codex from AIOSAI/AIPass. It costs 14 tokens per session (831 once invoked), scanned A, original, MIT.

A tool that password-locks a computer's graphical screen while programs and background tasks continue running.

In plain words
What is it for?
Locking a Linux desktop session from scripts or services, with a fallback for GNOME screensaver systems.
Why use it?
It protects the visible session without stopping agents, putting the computer to sleep, or requiring administrator access.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aiosai/aipass/screen_lock
Any agent
npx skills add AIOSAI/AIPass --skill screen_lock
Clone the repo
git clone --depth 1 https://github.com/AIOSAI/AIPass

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for screen_lock

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiosai/aipass/screen_lock.svg)](https://agentmods.dev/skills/aiosai/aipass/screen_lock)
Your own site
<a href="https://agentmods.dev/skills/aiosai/aipass/screen_lock"><img src="https://agentmods.dev/badge/skills/aiosai/aipass/screen_lock.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 831 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00831
Opus 5 $0.00007 $0.00415
Sonnet 5 $0.00003 $0.00166
Haiku 4.5 $0.00001 $0.00083

Measured 5d ago against content hash 1fea30d8b514, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

screen_lock scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (__init__.py, handler.py, tests/__init__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/aipass/skills/lib/screen_lock/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Screen Lock

What This Does

Password-locks the graphical session and leaves everything running — agents keep working behind the password wall. Nothing sleeps, nothing is killed, no root is needed (no sudoers grant, no polkit rule).

Two paths, tried in order:

  1. loginctl lock-session <id> against the explicitly resolved graphical session. Callers usually run as a systemd --user service with no XDG_SESSION_ID, so a bare lock-session has no ambient session to resolve and may refuse — naming the session is what makes the verb work from there.
  2. gdbusorg.gnome.ScreenSaver.Lock as the fallback.

If both fail it says so. A screen that never locked is never reported as locked.

Doctrine — lock is the exception

A destructive action never fires from a locked screen. Lock itself must work from anywhere — that is its whole point.

So this verb is never gated: it does not ask whether the screen is already locked, does not require a desktop environment, and does not refuse when no graphical session can be resolved (it still tries the bare call). Callers that gate other verbs on screen state must leave this one ungated.

Available Actions

Action Description
lock Lock the screen now; agents keep running

Usage

drone @skills run screen_lock lock

In-process (what the Telegram control bot and the host API verb lane use):

from aipass.skills.lib.screen_lock import handler as screen_lock

result = screen_lock.lock_screen()
# {"locked": True, "method": "loginctl", "session": "3", "error": None}

When to Use

Use this skill when:

  • You are leaving the machine and want the screen locked with work continuing
  • A remote surface (phone, host API, chat bot) needs to secure the desk

Do NOT use this skill when:

  • You want the machine to sleep — that is /suspend, a different verb with a wake, grace-window and reachability story. Lock never suspends.
  • You want to end sessions — nothing is stopped or killed here.

Read the full file on GitHub · 103 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 103 lines · 14 tokens per session scan A 1fea30d8b514

Subscribe to this mod's changes

screen_lock is a skill published in the GitHub repository AIOSAI/AIPass (273 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 831 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.