agentleFS
easyzoomeasyzoom/aix-skills/skills/embedded-timing-libs/SKILL.md

embedded-timing-libs

Skill36 starsChanged 5 months agoMITView on GitHub

Use when integrating, porting, configuring, or debugging embedded software timer libraries such as MultiTimer, timeout schedulers, or tick-based callback timers

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for lightweight software timer libraries such as MultiTimer.

    line 10
  2. Distinctive:

    Use this skill when:

    line 14
  3. Very specific:

    Do not use this skill for hardware PWM/timer peripheral bring-up.

    line 19
  4. Distinctive:

    Test one-shot and periodic behavior.

    line 43
  5. Distinctive:

    Verify start, stop, restart, and callback ordering.

    line 44
  6. Distinctive:

    Use simulated ticks or shortened counters to prove overflow behavior.

    line 47
  7. Distinctive:

    Before claiming timer integration works:

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Embedded Timing Libs

Overview

Use this skill for lightweight software timer libraries such as MultiTimer. The agent should confirm tick source, callback context, time units, wraparound behavior, and scheduler frequency before relying on timer callbacks.

When To Use

Use this skill when:

  • The user wants to add or debug MultiTimer, software timers, timeout lists, periodic callbacks, or one-shot timers.
  • Timers drift, fire too early/late, stop firing, fire repeatedly, or break across tick overflow.

Do not use this skill for hardware PWM/timer peripheral bring-up. Use embedded-peripheral-bringup for register-level timer issues.

First Questions

Ask for:

  • Timer library and target runtime.
  • Tick source and frequency.
  • Callback context: main loop, RTOS task, ISR, or scheduler hook.
  • Time units used by the library and application.
  • Number of timers and longest expected uptime.
  • Whether callbacks may start/stop other timers.

Integration Checklist

  1. Confirm tick monotonicity. Timer logic needs a stable increasing timebase or explicit wraparound handling.
  2. Match units. Milliseconds, ticks, microseconds, and RTOS ticks must not be mixed silently.
  3. Define callback context. Timer callbacks must not block if they run in ISR or scheduler critical context.
  4. Test one-shot and periodic behavior. Verify start, stop, restart, and callback ordering.
  5. Test wraparound. Use simulated ticks or shortened counters to prove overflow behavior.

Common Failures

  • Tick function returns seconds while timer expects milliseconds.
  • Callback blocks in interrupt context.
  • Timer list is modified while iterating without protection.
  • Drift accumulates because periodic timers restart from callback time instead of scheduled time.
  • Wraparound breaks after long uptime.

Verification

Before claiming timer integration works:

  • State tick source, frequency, unit, callback context, and protection strategy.
  • Confirm one-shot, periodic, cancel, restart, and wraparound behavior.
  • Confirm callback execution time is acceptable.
  • Confirm timer operations are safe from ISR/task contexts in use.

Example

User:

MultiTimer 定时回调偶尔不准。

Agent:

  1. Asks for tick source, units, callback context, and scheduling frequency.
  2. Checks unit conversion and whether callbacks block.
  3. Tests periodic drift and tick wraparound with a small counter.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.