# ICS Lint & Fix

> Validate and fix RFC 5545 iCalendar files with octet-aware line folding and CRLF correction.

ICS Lint & Fix is a free AI agent skill on Agensi by Miu, in Productivity. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Miu](https://www.agensi.io/creators/miu)
- Category: [Productivity](https://www.agensi.io/skills/productivity)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ics-lint-fix
- Tags: productivity, code-review, testing, icalendar, ics, calendar, validation, rfc5545

## About this skill

Generating .ics files that actually work across Google Calendar, Outlook, and Apple Calendar is notoriously difficult. Agents often fail at RFC 5545 technicalities like CRLF line endings, octet-based line folding for non-ASCII characters, and mandatory property validation. This skill provides a deterministic, dependency-free Python tool to validate and repair calendar files before they break a user's import.

### What it does
- **RFC 5545 Validation** checks for mandatory fields like UID, PRODID, and VERSION while ensuring DTEND occurs after DTSTART.
- **Octet-Aware Folding** repairs lines exceeding the 75-octet limit without splitting multi-byte characters (crucial for Japanese/non-ASCII content).
- **Line Ending Correction** automatically fixes files using bare LF instead of the required CRLF sequence.
- **Content Parsing** identifies malformed content lines that do not follow the NAME[;PARAMS]:VALUE structure.
- **Structural Reporting** outputs a clean JSON report of errors (blocking) and warnings (non-blocking) for CI/CD gates.

### How it works
1. Run `check` via the Python script on any UTF-8 .ics file to generate a JSON error report.
2. Review the `errors` and `warnings` arrays to identify structural or logical gaps.
3. Use the `fix` command to automate formatting repairs like line folding and line endings.
4. Verify the output file against the validator to confirm all E001 and E002 errors are resolved.

### Frameworks & tools
This tool is built for Python 3.9+ using only the standard library. It requires no external dependencies and works entirely offline across Linux, macOS, and Windows environments.

### Why this beats prompting it yourself
LLMs struggle with counting octets (bytes) versus characters, leading to broken line folding in internationalized text. This skill uses deterministic logic to handle low-level byte-level formatting that prompts frequently hallucinate or ignore.

### Use cases
- Validating agent-generated meeting invites before sending them to a client.
- Fixing broken .ics exports from legacy systems that use incorrect line endings.
- Checking calendar files in a CI/CD pipeline to prevent deployment of malformed data.
- Auditing event summaries for unescaped commas and semicolons that break parsing.

### Known limitations
Does not expand RRULE/EXDATE recurrence semantics or verify timezone database accuracy. It will not invent missing UIDs or DTSTAMP values; these must be provided by the calling agent.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the ICS Lint & Fix skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Why should I use this skill instead of just asking my AI agent to generate a valid .ics file?

Many AI agents struggle with byte-level formatting, often failing to use CRLF line endings or incorrectly splitting multi-byte characters during line folding. This skill provides a deterministic, RFC 5545-compliant engine that repairs these technical errors to ensure your .ics files work across Outlook, Google, and Apple Calendar.

### What platforms and AI frameworks are compatible with Ics Lint Fix?

This is a standalone Python tool (3.9+) that requires zero external dependencies, making it compatible with any AI agent or workflow that can execute Python scripts. It works offline across Linux, macOS, and Windows environments.

### What specific iCalendar violations can this tool detect?

The skill performs deep structural validation, including checking for mandatory fields (UID, PRODID, DTSTAMP), ensuring chronological integrity (DTEND after DTSTART), and verifying the NAME:VALUE property structure. It then generates a JSON report identifying both blocking errors and non-blocking warnings.

### Will the tool automatically generate missing data like UIDs or Timezone definitions?

No, the tool focuses on structural and formatting integrity. While it validates that a UID exists, it will not generate missing mandatory data or resolve complex timezone database lookups; it is designed to fix the formatting of the data your agent provides.

### What is included in the purchase of this skill?

You receive the full Python source code for the validator and fixer, along with documentation on how to integrate the JSON error reporting into your existing agent pipelines or CI/CD gates.

### How does the tool handle international text or special characters?

Unlike standard text editors that count characters, this skill is 'octet-aware.' It ensures that lines are folded at the 75-byte limit without breaking multi-byte characters, which is essential for calendar invites containing emojis or non-ASCII languages like Japanese or Arabic.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
