marco-civil-compliance
Skill4 starsChanged 4 months agoMITView on GitHub
Marco Civil da Internet (Lei 12.965/2014) and Decreto 8.771/2016 compliance for web applications, including the 2025 STF ruling that reshaped Art. 19 provider liability. Use when building internet platforms, implementing content moderation, handling user data logging, managing net neutrality obligations, or designing data retention policies for connection and application logs. For personal data processing rules, use lgpd-compliance instead.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- digital-eca-complianceSkill
- lgpd-complianceSkill
- lgpd-document-generatorSkill
- lgpd-sanctionsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 115
When discriminating traffic, the provider must:
- Distinctive: line 116
Avoid causing harm to users
- Distinctive: line 157
Must clearly and specifically identify the infringing content
- Distinctive: line 158
Must enable unambiguous location of the material
- Distinctive: line 163
When making content unavailable, the provider must:
- Distinctive: line 253
Connection providers: must NOT store application access logs (Art.
- Distinctive: line 254
Application providers: must NOT store access logs to *other* applications without user consent (Art.
- Distinctive: line 255
Must NOT store personal data excessive to the consented purpose (Art.
- Distinctive: line 281
When the legally mandated retention period expires
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Marco Civil da Internet Compliance (Lei 12.965/2014 + Decreto 8.771/2016)
Last verified against official sources: 2026-07-10
When to Use
- Building internet platforms or web applications serving Brazilian users
- Implementing content moderation or user-generated content features
- Designing data logging and retention systems (connection/application logs)
- Handling net neutrality requirements for ISPs or platform providers
- Responding to judicial orders for user data or content removal
- Drafting Terms of Service or privacy notices for Brazilian users
- Implementing user data deletion flows
- Building systems that store or process communication records
How to Respond
| Task | Respond with |
| Content removal / liability question | Walk the post-STF decision tree and state the applicable liability regime with its source (Art. 19/21 or STF June 2025) |
| Logging/retention design | Retention table (connection 1 year / application 6 months) + the compliant code patterns |
| Court order received | Validation checklist (Art. 22 required elements) + response steps |
| ToS/policy review | Gap list against the Terms of Service checklist with article references |
| Net neutrality question | Rule + allowed exceptions (Art. 9) with the Decreto 8.771/2016 details |
Key Definitions (Art. 5)
| Term | Definition |
| Internet | Global system of logical protocols for public and unrestricted use, enabling data communication between terminals via different networks |
| Terminal | Any computer or device that connects to the internet |
| IP address | Code assigned to a terminal to allow its identification |
| Conexao a internet | Enabling a terminal to send/receive data packets via IP address assignment |
| Registro de conexao | Connection log: date/time of start and end of connection, duration, and IP address used |
| Aplicacoes de internet | Internet applications: any set of functionalities accessible via a connected terminal |
| Registro de acesso a aplicacoes | Application access log: date/time of use of a specific internet application from a specific IP address |
Principles and Foundations (Arts. 2-4)
Foundations (Art. 2)
The use of the internet in Brazil is founded on:
- Freedom of expression (primary foundation)
- Recognition of the worldwide scale of the network
- Human rights, personality development, and digital citizenship
- Plurality and diversity
- Openness and collaboration
- Free enterprise, free competition, and consumer protection
- Social purpose of the network
Principles (Art. 3)
| Principle | Description |
| Freedom of expression | Guarantee of free speech, communication, and thought (constitutional terms) |
| Privacy protection | Protection of user privacy online |
| Personal data protection | As provided by law (now complemented by LGPD) |
| Net neutrality | Preservation and guarantee of network neutrality |
| Network stability | Preservation of stability, security, and functionality via international standards |
| Accountability | Agents responsible according to their activities |
| Participatory nature | Preservation of the participatory nature of the network |
| Business model freedom | Freedom of business models, provided they don't conflict with other principles |
Objectives (Art. 4)
- Universal right of access to the internet
- Access to information, knowledge, and cultural participation
- Innovation and diffusion of new technologies
- Adoption of open technological standards for interoperability
User Rights (Art. 7)
Internet access is essential for citizenship. Users are guaranteed:
| Right | Article | Implementation |
| Privacy and intimacy | Art. 7, I | Do not expose user behavior or personal information |
| Communication secrecy | Art. 7, II-III | Encrypt communications; only disclose by court order |
| No connection suspension | Art. 7, IV | Only suspend for debt directly from usage |
| Connection quality | Art. 7, V | Maintain contracted service quality |
| Clear contracts | Art. 7, VI | Detail data protection regime and network management in ToS |
| No data sharing without consent | Art. 7, VII | Don't share personal data or logs with third parties without free, express, informed consent |
| Transparent data practices | Art. 7, VIII | Inform users about collection, use, storage, processing, and protection of their data |
| Explicit consent | Art. 7, IX | Consent must be separate from other contractual clauses |
| Data deletion | Art. 7, X | Delete personal data on user request when relationship ends (subject to mandatory retention) |
| Clear usage policies | Art. 7, XI | Publish clear usage policies |
| Accessibility | Art. 7, XII | Consider physical, perceptual, sensory, intellectual, and mental characteristics |
| Consumer protection | Art. 7, XIII | Apply consumer protection law (CDC) to online transactions |
Privacy as Prerequisite (Art. 8)
Privacy and freedom of expression in communications are conditions for the full exercise of internet access rights. Contractual clauses that violate communication secrecy are null and void.
Net Neutrality (Arts. 9-10)
Core Rule (Art. 9)
The entity responsible for transmission, switching, or routing must treat all data packets equally — no discrimination by content, origin, destination, service, terminal, or application.
Allowed Exceptions (Art. 9, par. 1)
Traffic discrimination or degradation is allowed only for:
- Technical requirements indispensable for adequate service provision
- Emergency service prioritization
Requirements When Exceptions Apply (Art. 9, par. 2)
When discriminating traffic, the provider must:
- Avoid causing harm to users
- Act with proportionality, transparency, and equal treatment
- Inform users in advance, clearly, about traffic management practices
- Offer services under non-discriminatory commercial conditions
Prohibited (Art. 9, par. 3)
Blocking, monitoring, filtering, or analyzing the content of data packets is forbidden for connection providers.
Decreto 8.771/2016 — Net Neutrality Details
Acceptable technical requirements (Art. 5, par. 1):
- Network security measures (spam restriction, DDoS protection)
- Exceptional congestion handling (alternative routes, emergency situations)
Network management (Art. 6): Permitted only using measures compatible with international standards, following Anatel and CGI.br guidelines.
Transparency requirements (Art. 7): Providers must disclose traffic management practices via:
- Service contracts with end users
- Website information in accessible language
Disclosures must include: description of practices, effects on user experience, and reasons for adoption.
Prohibited practices (Art. 9):
- Compromising the public and unrestricted nature of internet access
- Prioritizing data packets based on commercial arrangements
- Privileging applications offered by the provider itself or its economic group
Provider Liability for User Content (Arts. 18-21)
Connection Providers (Art. 18)
Connection providers are NOT liable for damages from user-generated content.
Application Providers (Art. 19) — Judicial Order Requirement
⚠️ Partially unconstitutional since June 2025 — the STF reshaped this regime. Art. 19's pure judicial-order model now applies only to specific cases (crimes against honor, private communication services). See "STF Ruling (June 2025)" below before relying on Art. 19.
Original Art. 19 text: application providers can only be held civilly liable for third-party content if, after a specific court order, they fail to make the infringing content unavailable within the specified timeframe.
Court order requirements:
- Must clearly and specifically identify the infringing content
- Must enable unambiguous location of the material
- Nullity if identification is insufficient
Notice to Content Author (Art. 20)
When making content unavailable, the provider must:
- Notify the user who posted the content with the reasons
- Provide information enabling due process (contradictorio and ampla defesa)
- On user request, replace removed content with the court order justification
Intimate Content Exception (Art. 21)
For non-consensual intimate images/videos, the provider is subsidiarily liable if, after receiving notification from the victim, it fails to diligently remove the content. No court order required — notification suffices.
STF Ruling (June 2025) — Art. 19 Partially Unconstitutional
On 26/06/2025 the STF concluded the joint judgment of RE 1.037.396 (Tema 987) and RE 1.057.258 (Tema 533), declaring Art. 19 partially unconstitutional for being insufficient to protect fundamental rights. Until Congress passes new legislation, the following regime applies (effects are prospective — ex nunc):
| Content / situation | Liability regime after the ruling |
| Unlawful content in general (crimes, illicit acts) and accounts reported as inauthentic | Liability after extrajudicial notification if content is not removed (Art. 21 regime extended — tese item 3) — court order no longer required |
| Crimes against honor (calúnia, difamação, injúria) | Art. 19 preserved — court order still required for liability (provider may still remove voluntarily upon extrajudicial notification — item 3.1) |
| Paid ads, boosted content, and artificial distribution networks (chatbots/bots) | Presumed liability even without notification — provider escapes only by proving it acted diligently and in reasonable time to remove (item 4) |
| Serious crimes (duty of care — exhaustive list, item 5) | Immediate unavailability duty; liability for systemic failure to adopt adequate prevention/removal measures. List: antidemocratic acts/conduct (CP arts. 286, 359-L/M/N/P/R); terrorism and preparatory acts (Lei 13.260/2016); incitement to suicide or self-mutilation (CP art. 122); incitement to discrimination by race, color, ethnicity, religion, national origin, sexuality, or gender identity (Lei 7.716/1989); crimes against women motivated by gender, including misogynistic hate content; sexual crimes against vulnerable persons, child pornography, and grave crimes against children/adolescents; human trafficking (CP art. 149-A) |
| Isolated unlawful item from the serious-crimes list | An isolated/atomized item alone does NOT configure systemic failure — the Art. 21 regime applies instead (item 5.4); content restored by court order creates no indemnity against the provider (item 5.5) |
| Content identical to material already declared unlawful by court decision | All providers must remove upon judicial or extrajudicial notification, no new court order needed (item 3.2) |
| Email, closed video/voice meeting services, and instant messaging (interpersonal communications) | Art. 19 model preserved (protection of private communications — item 6) |
| Marketplaces | Liability governed by the Consumer Protection Code (CDC — item 7) |
| Electoral matters | Reserved to electoral legislation and TSE normative acts (item 2) |
Additional obligations established by the ruling (items 8-11):
- Self-regulation covering notification systems, due process, and annual transparency reports on extrajudicial notifications, ads, and boosted content
- Permanent, accessible, well-publicized service channels for users and non-users, preferably electronic
- Rules published and periodically reviewed in a transparent, publicly accessible way
- Headquarters and legal representative in Brazil (legal entity with full powers to respond administratively and judicially), with contact info easily accessible on the platform
CONTENT MODERATION DECISION TREE (post-STF June 2025):
1. Non-consensual intimate content?
YES → Remove upon victim notification (Art. 21)
2. Content violating children's/adolescents' rights?
YES → Remove immediately upon notification (ECA Digital Art. 29 — no court order)
3. Paid ad, boosted content, or bot-distributed content?
YES → Act proactively — liability is presumed even without notification
4. Serious-crimes list (terrorism, CSAM, racism, antidemocratic acts, ...)?
YES → Duty of care applies — prevent/remove proactively; systemic failure creates liability
5. Content identical to material already declared unlawful by a court?
YES → Remove upon notification (no new court order)
6. Crime against honor (calúnia, difamação, injúria)?
YES → Court order required for liability (Art. 19 still applies); voluntary removal allowed
7. Other unlawful content?
→ Liability after extrajudicial notification if not removed (Art. 21 regime)
After any removal:
- Notify the content author with reasons (Art. 20)
- Provide appeal mechanism and defined timelines
- Preserve evidence for legal proceedingsMonitor for changes: this regime is transitional — Congress may pass new platform-liability legislation that supersedes the STF ruling. Re-verify before relying on this section.
Data Retention Obligations
Connection Logs (Art. 13)
| Aspect | Requirement |
| Who | Autonomous system administrators (ISPs) |
| What | Connection logs (start/end time, duration, IP address) |
| Duration | 1 year minimum |
| Storage | Under secrecy, in controlled and secure environment |
| Delegation | Cannot be transferred to third parties |
| Extension | Police, administrative authority, or prosecutor can request cautionary extension |
| Access | Always requires court order (Art. 13, par. 5) |
Application Access Logs (Art. 15)
| Aspect | Requirement |
| Who | Application providers that are legal entities, organized, professional, and for-profit |
| What | Application access logs (date/time of use from a given IP) |
| Duration | 6 months minimum |
| Storage | Under secrecy, in controlled and secure environment |
| Extension | Police, administrative authority, or prosecutor can request cautionary extension |
| Access | Always requires court order (Art. 15, par. 3) |
What NOT to Log
- Connection providers must NOT store application access logs (Art. 14)
- Application providers must NOT store access logs to other applications without user consent (Art. 16, I)
- Must NOT store personal data excessive to the consented purpose (Art. 16, II)
Judicial Request for Logs (Art. 22)
Any party can request a judge to order log disclosure for civil or criminal proceedings. The request must contain:
- Well-founded evidence of the illegal act
- Justified reason for the usefulness of requested logs
- Specific time period for the logs
Decreto 8.771/2016 — Data Protection Standards
Security Standards for Data Custody (Art. 13)
Providers must observe these security guidelines:
| Requirement | Implementation |
| Strict access control | Define responsibilities; exclusive access privileges for designated users |
| Authentication mechanisms | Multi-factor authentication for accessing records; individualize responsible persons |
| Detailed access inventory | Log: timestamp, duration, identity of accessor, and file accessed |
| Data integrity solutions | Use encryption or equivalent measures to guarantee data inviolability |
Data Minimization (Art. 13, par. 2)
Providers must retain the minimum amount of personal data, private communications, and logs, deleting them:
- As soon as the purpose of use is achieved; OR
- When the legally mandated retention period expires
Data Interoperability (Art. 15)
Data subject to Art. 11 of the Marco Civil must be maintained in interoperable and structured format to facilitate access under court orders.
Transparency (Art. 16)
Security standards adopted by providers must be published clearly and accessibly, preferably on their websites, respecting trade secret confidentiality.
Registration Data Definition (Art. 11, par. 2)
Registration data that administrative authorities can request (without court order):
- Filiation (parentage)
- Address
- Personal qualification (name, marital status, profession)
Important: Requests must specify individuals and desired information — collective, generic, or unspecific requests are forbidden (Art. 11, par. 3).
Sanctions (Art. 12)
Violations of Arts. 10 and 11 are subject to:
| Sanction | Detail |
| Warning | With deadline for corrective measures |
| Fine | Up to 10% of gross revenue of the economic group in Brazil (excluding taxes) |
| Temporary suspension | Of activities involving data collection/storage/processing |
| Prohibition | Of activities involving data collection/storage/processing |
Foreign companies: their Brazilian branch, office, or establishment is jointly liable for fines.
Relationship with LGPD
The Marco Civil da Internet and LGPD are complementary frameworks:
| Aspect | Marco Civil (2014) | LGPD (2018) |
| Scope | Internet use in Brazil | All personal data processing |
| Consent | Required for data sharing with third parties (Art. 7, VII) | 10 legal bases; consent is one option (Art. 7) |
| Data deletion | On user request at end of relationship (Art. 7, X) | Broader right of deletion at any time (Art. 18, IV/VI) |
| Data retention | Specific periods for connection/application logs | General principles: purpose limitation, necessity |
| Provider liability | Judicial order model for content (Art. 19) | Controller/operator liability for data processing (Arts. 42-45) |
| Security | General obligation for log protection | Detailed security requirements (Arts. 46-49) |
| Authority | Anatel, Senacon, CADE (by domain) | ANPD (centralized for data protection) |
| Sanctions | Up to 10% of revenue | Up to 2% of revenue, capped at R$ 50M per infraction |
How They Interact
- Art. 7, X of Marco Civil was amended by LGPD to reference LGPD exceptions for data retention
- Art. 16, II of Marco Civil was amended by LGPD to allow data storage beyond consent in LGPD-authorized cases
- For logging: Marco Civil defines what and how long; LGPD governs how personal data within logs is processed
- For consent: LGPD's broader framework supersedes Marco Civil's simpler consent model
- For data deletion: Apply both — Marco Civil's mandatory retention periods override LGPD deletion requests during their validity
Implementation Checklist for Web Applications
Terms of Service and Privacy
- Clear ToS with data protection regime details (Art. 7, VI)
- Separate consent clause for data collection, distinct from other contractual terms (Art. 7, IX)
- Transparent data practices — inform about collection, use, storage, processing, protection (Art. 7, VIII)
- Usage policies published clearly and publicly (Art. 7, XI)
- Security standards published on website (Decreto Art. 16)
Data Retention and Deletion
- Application access logs retained for 6 months minimum in secure environment (Art. 15)
- Log deletion after retention period — do not keep beyond legal obligation (Decreto Art. 13, par. 2)
- User data deletion endpoint — delete personal data on request at end of relationship (Art. 7, X)
- No excessive data — don't store data beyond the consented purpose (Art. 16, II)
- No cross-application tracking without consent (Art. 16, I)
Content Moderation
- Extrajudicial notification channel — receive and process removal notifications from users (STF June 2025 — Art. 21 regime extended)
- Court order process — implement workflow for receiving and executing judicial orders (Art. 19 — still required for crimes against honor)
- Content author notification — notify users when their content is removed, with reasons and appeal path (Art. 20 + STF due process)
- Intimate content fast-track — immediate removal upon victim notification, no court order needed (Art. 21)
- Proactive monitoring — for paid/boosted content and the serious-crimes duty-of-care list (STF June 2025)
- Annual transparency report — content moderation statistics published (STF June 2025)
- Legal representative in Brazil — appointed and reachable (STF June 2025)
- Evidence preservation — keep records of removed content and orders for legal proceedings
Security and Access Control
- Strict access control for log data with defined responsibilities (Decreto Art. 13, I)
- Multi-factor authentication for accessing stored records (Decreto Art. 13, II)
- Detailed access audit trail — who accessed what, when, for how long (Decreto Art. 13, III)
- Encryption of stored records (Decreto Art. 13, IV)
- Interoperable format for stored data to comply with court orders (Decreto Art. 15)
Court Order Compliance
- Dedicated process for receiving and responding to judicial requests for logs
- Never disclose logs without court order (Arts. 13 par. 5, 15 par. 3)
- Registration data process — administrative authorities can request basic registration data with legal basis (Art. 10, par. 3; Decreto Art. 11)
- Preserve secrecy of judicial requests when required (Art. 23)
Code Patterns for Logging Compliance
What to Log (Application Access Logs)
# Pseudocode — Marco Civil Compliant Access Log
def log_application_access(request):
"""
Art. 15: Application providers must log access records.
Log ONLY what's required — date/time and source IP.
Do NOT log page content, request bodies, or user behavior details.
"""
return {
"timestamp": now_utc(), # Date and time of access
"source_ip": request.client_ip, # IP address used
"application": request.app_id, # Which application was accessed
# Do NOT include: user agent, referrer, request body, cookies,
# browsing path, or any data beyond what Art. 5, VIII defines
}Retention and Automatic Deletion
# Pseudocode — Log Retention Policy
# Marco Civil retention periods
CONNECTION_LOG_RETENTION_DAYS = 365 # Art. 13: 1 year for connection logs
APPLICATION_LOG_RETENTION_DAYS = 180 # Art. 15: 6 months for application logs
def enforce_log_retention():
"""
Decreto Art. 13, par. 2: Delete logs as soon as the retention
period expires. Do not keep beyond legal obligation.
"""
cutoff_date = now() - timedelta(days=APPLICATION_LOG_RETENTION_DAYS)
delete_application_logs_before(cutoff_date)
def check_cautionary_hold(log_id):
"""
Art. 13, par. 2 / Art. 15, par. 2: Police, administrative authority,
or prosecutor can request extended retention. Check before deleting.
"""
hold = get_cautionary_hold(log_id)
if hold and hold.is_active:
return False # Do not delete — under cautionary hold
return True # Safe to deleteAccess Control for Logs
# Pseudocode — Log Access Control (Decreto Art. 13)
def access_log_records(accessor, log_query):
"""
Decreto Art. 13: Strict access control with audit trail.
"""
# I - Verify accessor has explicit authorization
if not has_log_access_privilege(accessor):
raise UnauthorizedAccess("No privilege for log access")
# II - Require multi-factor authentication
if not accessor.mfa_verified:
raise AuthenticationRequired("MFA required for log access")
# III - Record detailed access inventory
record_access_audit(
accessor_id=accessor.id,
accessor_name=accessor.full_name,
timestamp=now_utc(),
duration=None, # Updated on session end
files_accessed=log_query.describe(),
legal_basis=log_query.court_order_ref, # Court order reference
)
# IV - Decrypt records (stored encrypted per Art. 13, IV)
return decrypt_and_return(log_query)Court Order Response
# Pseudocode — Judicial Request Handler (Art. 22)
def handle_court_order(order):
"""
Art. 22: Provide logs only under court order.
Validate the order contains all required elements.
"""
# Validate required elements (Art. 22, paragrafo unico)
if not order.has_evidence_of_illegal_act: # I - fundados indicios
raise InvalidOrder("Missing evidence of illegal act")
if not order.has_justified_utility: # II - justificativa
raise InvalidOrder("Missing justification for log utility")
if not order.has_specific_period: # III - periodo
raise InvalidOrder("Missing specific time period")
# Art. 19, par. 1: Content orders must clearly identify material
if order.is_content_order and not order.has_clear_identification:
raise InvalidOrder("Content not clearly identified — order is null")
# Retrieve logs for the specified period only
logs = get_logs_for_period(order.start_date, order.end_date)
# Art. 23: Ensure secrecy as determined by the judge
if order.requires_secrecy:
mark_as_secret(order.id)
return prepare_response(logs, format="interoperable") # Decreto Art. 15User Data Deletion
# Pseudocode — User Data Deletion (Art. 7, X)
def delete_user_data(user_id):
"""
Art. 7, X: Delete personal data on user request at end of relationship.
Respect mandatory retention periods for logs.
"""
# Delete personal/profile data immediately
delete_profile_data(user_id)
delete_user_content(user_id)
revoke_all_sessions(user_id)
# Application access logs: retain for 6 months (Art. 15)
# Mark for deletion after retention period expires
schedule_log_deletion(
user_id=user_id,
log_type="application_access",
delete_after=now() + timedelta(days=APPLICATION_LOG_RETENTION_DAYS),
)
# Anonymize logs that must be retained
anonymize_retained_logs(user_id)
return {"status": "deleted", "logs_retained_until": retention_expiry}References
- Lei 12.965/2014 (Marco Civil da Internet)
- Decreto 8.771/2016 (Regulamenta o Marco Civil)
- Lei 13.709/2018 (LGPD) — Complementary data protection framework
- STF — RE 1.037.396 (Tema 987) e RE 1.057.258 (Tema 533) — Julgamento de 26/06/2025 sobre o Art. 19
See Also
lgpd-compliance— Use together. LGPD governs personal data processing; Marco Civil governs internet platform operations. Both apply to web applications handling user data in Brazil.digital-eca-compliance— Use when the platform is accessible to children. ECA Digital adds content moderation and design obligations on top of Marco Civil's provider liability framework.lgpd-document-generator— Use when generating Terms of Use that need data retention clauses aligned with Marco Civil's log requirements (Art. 13-15).moderation-legal-framework— Use for deeper content moderation guidance, including the 2025 STF decision on Art. 19 and notice-and-takedown procedures.
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
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.

