agentleFS
hi-donwihi-donwi/Donwi-Skills/skills/environmental-telemetry/SKILL.md

environmental-telemetry

Skill0 starsChanged 12 days agoMITView on GitHub

Implement environmental telemetry, Modbus RTU acquisition, Parshall flume volumetric flow, sensor calibration drift limits, and offline spooling.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Verify that downstream submergence $H_b / H_a$ does not exceed free-flow thresholds (50% to 70%).

    line 38
  2. Very specific:

    Telemetry Simulation & Demo Isolation: When testing or running telemetry simulations (such as moving sensor streams per 5 seconds), persist …

    line 51
  3. Distinctive:

    Verify Parshall flume calculation matches empirical tables for 1-inch through 3-foot throats.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Environmental Telemetry

Overview

Environmental telemetry systems (such as SPARING for wastewater and SISPEK for stack emissions) require continuous, verifiable acquisition of environmental parameters. Ingested readings must be mathematically sound, calibrated within regulatory tolerances, and durable against field network disruptions.

When to use

  • Connecting industrial dataloggers or sensors over RS485 / Modbus RTU.
  • Computing open-channel water flow using Parshall flumes or weir equations.
  • Evaluating daily zero and span calibration drift against regulatory thresholds (drift <= 2.5%).
  • Implementing store-and-forward edge spooling queues for intermittent uplinks.

Hand off when

NeedSkill
Inbound HTTP partner webhooks and signature verificationwebhook-integrations
Durable async background workers and lease recoverybackground-jobs
Service telemetry, OpenTelemetry, and structured metricsobservability

Process

  1. Acquire and Validate Modbus RTU Frames. Compute CRC-16 (IBM/ANSI polynomial 0xA001). Decode 16-bit holding and input registers into IEEE 754 32-bit floats. Handle byte-order permutations (Big-Endian / Little-Endian word swaps) deterministically. Reject frames with corrupted checksums or out-of-range sensor values before persisting.
  2. Compute Open-Channel Flow Rate. For Parshall flumes, apply $Q = C \times H^n$ based on flume throat width $W$. Validate head measurement $H$ at the gauge point (2/3 upstream). Verify that downstream submergence $H_b / H_a$ does not exceed free-flow thresholds (50% to 70%).
  3. Audit Daily Sensor Calibration Drift. Compare observed zero gas/water and span standard concentrations against reference standards: $$\text{Drift (%)} = \left| \frac{\text{Observed} - \text{Reference}}{\text{Span Range}} \right| \times 100%$$ Enforce the regulatory threshold: $\text{Drift} \le 2.5%$. Flag any sensor exceeding 2.5% as Out-of-Calibration (DRIFT_EXCEEDED) and generate an audit record.
  4. Buffer Telemetry in a Durable Offline Spool. Implement a local persistent queue (SQLite WAL or append-only storage) at the edge. Buffer samples when 4G/LTE connectivity drops. Replay buffered samples chronologically with exponential backoff and batch acknowledgments once connectivity is restored.
  5. Enforce Idempotency and Auditability. Assign monotonically increasing sequence numbers and hardware timestamps. Store raw sensor millivolts/registers alongside transformed engineering units for verifiable compliance audits.
  6. Telemetry Simulation & Demo Isolation. When testing or running telemetry simulations (such as moving sensor streams per 5 seconds), persist synthetic telemetry strictly at the local database layer (target_storage = "database"). Never forward simulated readings to third-party endpoints or regulatory gateways (forward_third_party = 0). High-frequency live simulation (<= 5s) must generate realistic sensor jitter without saturating remote external quotas or contaminating production telemetry archives.

Red flags

  • Trusting Modbus registers without CRC validation or range sanity checks.
  • Assuming free-flow discharge when downstream water backs up into the Parshall throat.
  • Suppressing calibration drift errors or rounding drift values to bypass the 2.5% threshold.
  • Dropping telemetry packets when edge networking disconnects instead of queuing to disk.
  • Forwarding simulated or synthetic test telemetry to third-party APIs or regulatory gateways.
  • Telemetry simulation intervals exceeding 5 seconds during active live monitoring demo sessions.

Verification

  • Unit test CRC-16 calculation against known test vectors (0xFFFF initial seed).
  • Verify Parshall flume calculation matches empirical tables for 1-inch through 3-foot throats.
  • Drift calculation unit tests confirm Pass at 2.49% and Fail at 2.51%.
  • Edge spooling recovers gracefully across process restarts and simulated network partitions.
  • Telemetry simulation confirms readings persist to database with target_storage = "database" and forward_third_party = 0.

References

  • references/telemetry-standards.md - Modbus CRC-16 vectors, Parshall equations, and drift algorithms.

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.