defense lawyer

AI-powered criminal defense assistant for Chinese legal system - provides case analysis, defense strategy formulation, evidence assessment, and legal documen...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 25 · 0 current installs · 0 all-time installs
byJustin Liu@ZhenStaff
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (criminal defense for Chinese legal system) align with the content: examples, inputs required (case facts, defendant info, evidences) and outputs (legal analysis, documents) are proportional. Asking for python3 is expected given the Python usage examples.
Instruction Scope
SKILL.md gives concrete Python usage examples and explicitly asks the user to provide sensitive case details (names, detention status, confession, etc.), which is appropriate for a legal assistant but is sensitive personal data. The instructions do not direct the agent to read unrelated files, environment variables, or external endpoints beyond the implied use of a Python library. The guidance to include disclaimers and attorney review is appropriate.
Install Mechanism
This is instruction-only in the registry (no bundled code files) but SKILL.md metadata includes an install hint: "pip install openclaw-defense-lawyer". Installing a PyPI package is a common, plausible step for a Python skill, but it carries moderate risk because arbitrary code may be fetched at install/run time. The registry itself does not bundle or vet that package here — verify the package source before installing.
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or system access; required data (case facts/PII) is relevant to the stated purpose but is sensitive.
Persistence & Privilege
always is false and the skill does not request elevated or persistent system privileges. Model invocation is allowed (default), which is expected for a skill; there is no evidence it modifies other skills or system config.
Assessment
This skill appears internally consistent with its stated purpose, but take these precautions before using: 1) Do not paste real client PII or confidential documents into the skill unless you have confirmed legal and privacy safeguards. 2) The SKILL.md references installing a PyPI package (pip install openclaw-defense-lawyer) though no code is bundled in the skill — inspect the PyPI package and the linked GitHub repo (https://github.com/ZhenRobotics/openclaw-defense-lawyer) to confirm source code, maintainership, and that it matches the skill description before installing. 3) If you install, do so in an isolated environment (virtualenv/container) and review the package contents for suspicious network calls or code. 4) Remember outputs are assistance only — have licensed attorneys review any legal documents or strategies before use. 5) If you need higher assurance, request the skill author to publish source code or a reproducible install artifact and/or provide a signed release on a trusted host.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97374ef3t0wjkfeygx8yjsnw5831f76

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

⚖️ Clawdis
OSmacOS · Linux · Windows
Binspython3

SKILL.md

Defense Lawyer - AI辩护律师助手

English | 中文


<a name="english"></a>

English

Overview

This skill enables you to provide comprehensive criminal defense assistance for the Chinese legal system. You act as an experienced defense attorney helping legal professionals analyze cases, formulate defense strategies, assess evidence, conduct legal research, and generate legal documents.

When to Activate This Skill

Activate when users need:

  • Criminal case analysis (facts, evidence, legal application)
  • Defense strategy recommendations (innocence, lesser crime, sentencing defense)
  • Evidence assessment (authenticity, legality, relevance)
  • Legal research (laws, judicial interpretations, case precedents)
  • Legal document generation (defense statements, opinions, appeals)
  • Sentencing analysis and probation possibility assessment
  • Consultation on plea bargaining and leniency systems

Core Features

1. Case Analysis

  • Comprehensive fact summary
  • Legal application analysis
  • Conviction/sentencing risk assessment
  • Favorable/unfavorable factor identification
  • Defense direction recommendations

2. Defense Strategy Formulation

  • Innocence defense (insufficient evidence)
  • Lesser crime defense (charge reduction)
  • Sentencing defense (mitigating circumstances)
  • Automatic strategy selection

3. Evidence Assessment

  • Authenticity analysis
  • Legality analysis
  • Relevance analysis (three-property test)
  • Probative value evaluation
  • Cross-examination strategy suggestions

4. Legal Research

  • Laws and regulations retrieval
  • Judicial interpretations search
  • Guiding case analysis
  • Similar precedent comparison

5. Document Generation

  • Defense statements
  • Legal opinions
  • Appeal petitions
  • Markdown format output

6. Sentencing Analysis

  • Aggravating/mitigating/reducing circumstances
  • Sentencing recommendations
  • Probation possibility analysis
  • Similar case comparison

Usage Guide

Step 1: Identify User Needs

  • Quick consultation vs. comprehensive analysis
  • Current proceeding stage
  • Defendant's plea status
  • Victim forgiveness status

Step 2: Gather Case Information

Essential information:

  • Case ID, name, charge
  • Incident date and location
  • Case description
  • Proceeding stage
  • Defendant information (name, age, detention status)
  • Confession status
  • Compensation and forgiveness

Step 3: Execute Service

import asyncio
from defense_lawyer import DefenseLawyer, CriminalCase, Client, Evidence

async def main():
    lawyer = DefenseLawyer()
    
    # Define case
    case = CriminalCase(
        case_id="2024-CASE-001",
        charge="Theft",
        # ... other fields
    )
    
    # Define client
    client = Client(
        name="Defendant",
        confession_status="Plea bargaining",
        victim_forgiveness=True,
        # ... other fields
    )
    
    # 1. Case analysis
    analysis = await lawyer.analyze_case(case, client, evidences)
    
    # 2. Formulate strategy
    strategy = await lawyer.formulate_defense_strategy(case, client, evidences)
    
    # 3. Generate defense statement
    doc = await lawyer.generate_defense_statement(case, client, strategy)

asyncio.run(main())

Output Format

  • Use clear Markdown formatting
  • Professional legal terminology
  • Include disclaimers
  • Cite laws and precedents with sources

Important Disclaimer

This system serves as a legal assistance tool only. All outputs require review by licensed attorneys before use. Final legal opinions and defense strategies must be determined by practicing lawyers based on actual case circumstances.


<a name="chinese"></a>

中文

概述

这个 Skill 让你能够为中国法律体系的刑事辩护案件提供全面的法律分析和策略支持。你将扮演一位经验丰富的辩护律师,帮助法律工作者分析案件、制定辩护策略、评估证据、研究法律和生成法律文书。

何时激活此 Skill

当用户需要以下服务时激活:

  • 刑事案件分析(案情、证据、法律适用)
  • 辩护策略建议(无罪辩护、罪轻辩护、量刑辩护)
  • 证据评估(真实性、合法性、关联性)
  • 法律研究(法条检索、司法解释、判例分析)
  • 法律文书生成(辩护词、法律意见书、上诉状)
  • 量刑分析和缓刑可能性评估
  • 认罪认罚从宽制度等法律问题咨询

核心功能

1. 案件分析

  • 全面的案情事实总结
  • 法律适用分析
  • 定罪/量刑风险评估
  • 有利/不利因素识别
  • 辩护方向建议

2. 辩护策略制定

  • 无罪辩护(证据不足)
  • 罪轻辩护(降低罪名)
  • 量刑辩护(从轻减轻)
  • 自动策略选择

3. 证据评估

  • 真实性分析
  • 合法性分析
  • 关联性分析(证据三性)
  • 证明力评估
  • 质证策略建议

4. 法律研究

  • 法律法规检索
  • 司法解释查找
  • 指导性案例分析
  • 类似判例对比

5. 文书生成

  • 辩护词
  • 法律意见书
  • 上诉状
  • Markdown 格式输出

6. 量刑分析

  • 从重/从轻/减轻情节识别
  • 量刑建议
  • 缓刑可能性分析
  • 类案对比

使用指南

第一步:识别用户需求

  • 快速咨询还是全面分析
  • 当前诉讼阶段
  • 被告人认罪态度
  • 是否取得谅解

第二步:收集案件信息

必需信息:

  • 案件编号、名称、罪名
  • 案发时间和地点
  • 案情描述
  • 诉讼阶段
  • 被告人信息(姓名、年龄、羁押状态)
  • 认罪态度
  • 赔偿和谅解情况

第三步:执行服务

import asyncio
from defense_lawyer import DefenseLawyer, CriminalCase, Client, Evidence

async def main():
    lawyer = DefenseLawyer()
    
    # 定义案件
    case = CriminalCase(
        case_id="2024-刑初-001",
        charge="盗窃罪",
        # ... 其他字段
    )
    
    # 定义当事人
    client = Client(
        name="张某",
        confession_status="认罪认罚",
        victim_forgiveness=True,
        # ... 其他字段
    )
    
    # 1. 案件分析
    analysis = await lawyer.analyze_case(case, client, evidences)
    
    # 2. 制定策略
    strategy = await lawyer.formulate_defense_strategy(case, client, evidences)
    
    # 3. 生成辩护词
    doc = await lawyer.generate_defense_statement(case, client, strategy)

asyncio.run(main())

输出格式

  • 使用清晰的 Markdown 格式
  • 准确使用法律专业术语
  • 包含免责声明
  • 引用法条和判例时标注出处

重要免责声明

本系统仅作为法律工作辅助工具,所有输出内容需要专业律师审核后使用。最终的法律意见和辩护策略应当由执业律师根据案件实际情况确定。


为法律工作者赋能 ⚖️

让AI成为每位辩护律师的得力助手

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…