delete-old-logs

delete-old-logs is a skill for Claude Code, Codex from yildirimozal/ajanox. It costs 30 tokens per session (836 once invoked), scanned B, original, Apache-2.0.

A cleanup tool that finds log files older than a chosen number of days in a specified folder and removes them. Log files are records that software keeps about its activity.

In plain words
What is it for?
Use it to clean old .log files in locations such as /var/log, macOS log folders, or Downloads.
Why use it?
It helps clear old logs that take up disk space. The instructions say the found files are passed to the runtime's visible safety confirmation before deletion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to clean old .log files in locations such as /var/log, macOS log folders, or Downloads.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yildirimozal/ajanox/delete-old-logs
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.

Any agent
npx skills add yildirimozal/ajanox --skill delete-old-logs
Clone the repo
git clone --depth 1 https://github.com/yildirimozal/ajanox

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 delete-old-logs

README.md
[![agentmods](https://agentmods.dev/badge/skills/yildirimozal/ajanox/delete-old-logs/github.svg)](https://agentmods.dev/skills/yildirimozal/ajanox/delete-old-logs)
Your own site
<a href="https://agentmods.dev/skills/yildirimozal/ajanox/delete-old-logs"><img src="https://agentmods.dev/badge/skills/yildirimozal/ajanox/delete-old-logs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for delete-old-logs

Your own site · 80×15
<a href="https://agentmods.dev/skills/yildirimozal/ajanox/delete-old-logs"><img src="https://agentmods.dev/badge/skills/yildirimozal/ajanox/delete-old-logs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 836 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00030 $0.00836
Opus 5 $0.00015 $0.00418
Sonnet 5 $0.00006 $0.00167
Haiku 4.5 $0.00003 $0.00084

Measured 12d ago against content hash 7729b9b9451f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

delete-old-logs scanned grade B with 1 finding 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 12d ago.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Permission denied (sistem koruması): "İzin hatası: <detay>" — sudo isteme
skills/delete-old-logs/SKILL.md · 79 lines

What it actually says

Delete Old Logs Skill

Belirli bir klasörde N günden eski log dosyalarını bulup siler. Bu, klasik "30 günden eski log dosyalarını sil" senaryosunun referans implementasyonudur.

Parametreler

  • klasor (zorunlu): aranacak yol. Türkçe ifadeleri İngilizce'ye çevir:
    • "log klasörü" → /var/log (Linux) veya ~/Library/Logs (macOS)
    • "indirilenler" → ~/Downloads
  • gun (opsiyonel, default: 30): kaç günden eski

Çalıştırılacak komutlar (SIRAYLA, AYNI TURDA, DURMA)

Adım 1: Listele

find <klasor> -type f -name "*.log" -mtime +<gun>

Bu komut shell_safe — sessizce çalışır.

Adım 2: Hemen Sil (komut çıktısı boş değilse)

Kullanıcıya hiçbir şey sormadan, doğrudan rm çağır:

rm -f <dosya1> <dosya2> ...

<dosya1> <dosya2> yerine Adım 1'in çıktısındaki dosya yollarını koy.

KRİTİK: "Silmek istiyor musunuz?" diye SORMA. Doğrudan rm bash çağrısını yap. Çünkü:

  • rm shell_unsafe kategorisindedir
  • Ajanox güvenlik katmanı zaten runtime'da kullanıcıya görünür onay sorusu çıkaracak ([E]vet/[H]ayır/[T]ümü)
  • Skill'in görevi komutu hazırlamak; kullanıcıyı onaylatmak ASLA SKILL'İN İŞİ DEĞİL — runtime'ın işi
  • Eğer sorarsan: kullanıcı iki kere onay vermek zorunda kalır → kötü UX

Sonuç işleme

  • rm başarılı (exit 0): "X dosya silindi" rapor et
  • rm reddedildi (Ajanox güvenlik onay vermedi): "İşlem iptal edildi, dosyalar duruyor"
  • Liste boştu: " günden eski log dosyası yok, silinecek bir şey yok"

Hata durumları

  • Klasör yoksa: "Klasör bulunamadı: "
  • Permission denied (sistem koruması): "İzin hatası: " — sudo isteme
  • macOS /var/log SIP korumalı; ~/Library/Logs yazılabilir

Güvenlik notu

shell_unsafe ve file_write permission'larını gerektirir. Critical path (~/.ssh, /etc, ...) altında bir log dosyasına dokunulursa Ajanox ekstra onay katmanı devreye girer ve "T (Tümünü onayla)" opsiyonu KAPALI olur.

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. 12d ago First seen · 79 lines · 30 tokens per session scan B 7729b9b9451f

Subscribe to this mod's changes

delete-old-logs is a skill published in the GitHub repository yildirimozal/ajanox (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 836 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

speicherbereinigung

Evidenzbasierte Windows-Speicherbereinigung mit kontrolliertem Notfallmodus, physischer Belegungsmessung, Prozess- und Entstehungsforensik sowie reversiblen Maßnahmen gegen wiederkehrende Speicherfüller.

ellmos-ai/skills · 54 tokens

folder-flattening

Verschachtelte Ordnerhierarchien in flache, maschinenlesbare Strukturen umbauen. Bash-basiert mit intelligenter Merge-Logik.

ellmos-ai/skills · 39 tokens

batch-file-ops

Batch-Dateioperationen (Löschen, Verschieben, Kopieren, Auflisten) mit Glob-Mustern. CLI-Werkzeug für effiziente Dateisystem-Operationen. Ohne Abhängigkeiten.

ellmos-ai/skills · 49 tokens

nulcleaner

Findet und löscht Windows-reservierte NUL-Dateien, die durch die Nutzung von /dev/null in Git Bash entstehen. Headless oder mit GUI.

ellmos-ai/skills · 37 tokens

folder-organization

Ordner und Dateiablagen semantisch aufräumen: lokale Regeln und vorhandene Taxonomie erkennen, Dateien inhaltlich zuordnen, zusammengehörige Sets erhalten, klare Vorgänger-/Nachfolgerreihen und Logs archivieren, gemischte gültige und überholte Inhalte per Cut-and-Clue trennen und Löschkandidaten reversibel in einen…

ellmos-ai/skills · 227 tokens

integration-test

Run a live-instance verification of traceway-cli that goes beyond the Go smoke suite — exercises real-data detail endpoints, TTY-default rendering, adaptive metric-name discovery, and emits a human-readable coverage report. Invoke ONLY when the user explicitly asks (e.g. "run integration tests", "verify the CLI…

tracewayapp/traceway · 90 tokens