RULE
Lineth Smart Contract Development Guidelines
Install / Use
npx skills add LFDT-Lineth/lineth-monorepoInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
LegalSupported Platforms
Our assessment of RULE
RULE scores 59/100 on our quality scale, 199th of 214 Legal skills we index.
Its Cursor Rules is 4.8 KB long, well organised into 16 sections with 4 code examples: a solid amount of guidance for an agent.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- We could not determine when the repository was last updated.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
RULE compared with similar skills
All 4 of these similar skills score higher than RULE; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| RULE (this skill)by LFDT-Lineth | 59 | 0 | — | Cursor Rules |
| constraint-driven-developmentby addyosmani | 100 | 108.2k | 10d ago | SKILL.md |
| developer-growth-analysisby ComposioHQ | 100 | 77.4k | 35d ago | SKILL.md |
| hyperframes-cliby heygen-com | 100 | 67.0k | 4d ago | SKILL.md |
| ai-native-cliby sickn33 | 100 | 47.9k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install RULE?
- Run
npx skills add LFDT-Lineth/lineth-monorepo. The install tabs above show the steps for each supported agent. - Which AI agents does RULE work with?
- It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
- Is RULE safe to use?
- It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is RULE still maintained?
- We could not determine when the repository was last updated.
Skill content
View source on GitHubdescription: Lineth Smart Contract Development Guidelines globs: contracts//*.sol, contracts/token-generation-event//*.sol alwaysApply: false
Reference: Lineth Contract Style Guide
Lineth Smart Contracts - Development Guidelines
Licenses
- Interfaces:
// SPDX-License-Identifier: Apache-2.0 - Contracts:
// SPDX-License-Identifier: AGPL-3.0
NatSpec Documentation
ALWAYS use NatSpec for all public/external items. This is critical for:
- Consumer documentation via interfaces
- Block explorer documentation
Requirements
- Every public/external function MUST have
@notice - Every function parameter MUST have
@param _paramName(in the same order as the function signature) - Every return value MUST have
@return variableName - Events MUST document all parameters (in order)
- Errors MUST explain when they are thrown
- Use
DEPRECATEDin NatSpec for deprecated items
Example
// CORRECT
/**
* @notice Sends a message to L2.
* @param _to The recipient address on L2.
* @param _fee The fee amount in wei.
* @param _calldata The message calldata.
* @return messageHash The hash of the sent message.
*/
function sendMessage(
address _to,
uint256 _fee,
bytes calldata _calldata
) external payable returns (bytes32 messageHash);
// WRONG - Missing NatSpec
function sendMessage(
address _to,
uint256 _fee,
bytes calldata _calldata
) external payable returns (bytes32);
// WRONG - Parameters out of order
/**
* @notice Sends a message to L2.
* @param _calldata The message calldata.
* @param _to The recipient address on L2.
* @param _fee The fee amount in wei.
*/
function sendMessage(
address _to,
uint256 _fee,
bytes calldata _calldata
) external payable;
Imports
Always use named imports:
// CORRECT
import { IMessageService } from "../interfaces/IMessageService.sol";
// WRONG
import "../interfaces/IMessageService.sol";
Naming Conventions
| Item | Convention | Example |
|------|------------|---------|
| Public state | camelCase | uint256 messageCount |
| Private/internal state | _camelCase | uint256 _internalCounter |
| Constants | UPPER_SNAKE_CASE | bytes32 DEFAULT_ADMIN_ROLE |
| Function params | _camelCase | function send(address _to) |
| Return variables | camelCase (named) | returns (bytes32 messageHash) |
| Mappings | descriptive keys | mapping(uint256 id => bytes32 hash) |
| Init functions | __Contract_init | __PauseManager_init() |
Visibility
- Constants:
internalunless explicitly needed public - Functions: Minimize
external/publicsurface area - Avoid:
this.functionCall()pattern - refactor instead
File Layout
Interface Structure
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.33;
import { ImportType } from "../ImportType.sol";
/**
* @title Brief description.
* @author Consensys Incorporated
* @custom:security-contact security-report@linea.build
*/
interface ISampleContract {
// 1. Structs
// 2. Enums
// 3. Events (with NatSpec)
// 4. Errors (with NatSpec explaining when thrown)
// 5. External Functions
}
Contract Structure
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.33;
import { ISampleContract } from "./interfaces/ISampleContract.sol";
/**
* @title Brief description.
* @author Consensys Incorporated
* @custom:security-contact security-report@linea.build
*/
contract SampleContract is ISampleContract {
// 1. Constants (public, internal, private)
// 2. State variables
// 3. Structs
// 4. Enums
// 5. Events (with NatSpec)
// 6. Errors (with NatSpec)
// 7. Modifiers
// 8. Functions (public, external, internal, private)
}
Inheritance & Customization
When extending Lineth contracts:
- Use
virtual/overridekeywords - Override
CONTRACT_VERSION()for custom versions - See examples in
src/_testing/unit/for patterns - Note: Any modifications from audited code should be independently audited
General Rules
- Avoid magic numbers: Use named constants
- Assembly: Use hex for memory offsets (
mstore(add(mPtr, 0x20), _var)) - Linting: Run
pnpm run lint:fixbefore committing
Deployment
- Set
VERIFY_CONTRACT=truefor block explorer verification - Use deployer private key:
DEPLOYER_PRIVATE_KEY(all networks) - See
contracts/docs/deployment/README.mdfor full parameter reference
Testing
- Run Solidity linting:
pnpm -F contracts run lint:sol - Run TypeScript linting:
pnpm -F contracts run lint:ts - Run tests:
pnpm -F contracts run coverage
Checklist
Before submitting a PR:
- [ ] All public items have NatSpec (
@notice,@param,@return) - [ ] Named imports used
- [ ] Naming conventions followed
- [ ] Constants are
internalunless needed public - [ ] Linting passes (
pnpm run lint:fix) - [ ] No magic numbers
Related Skills
constraint-driven-development
108.2kEstablishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-i…
developer-growth-analysis
77.4kAnalyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.
hyperframes-cli
67.0kUse the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history,…
ai-native-cli
47.9kDesign spec with 98 rules for building CLI tools that AI agents can safely use. Covers structured JSON output, error handling, input contracts, safety guardrails, exit codes, and agent self-description.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
