> For the complete documentation index, see [llms.txt](https://solstep.gitbook.io/solidity-steps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solstep.gitbook.io/solidity-steps/tips/tips-slither-tutorial.md). Agents can also search and read this documentation through its [MCP server](https://solstep.gitbook.io/solidity-steps/~gitbook/mcp).

# Tips: Slither Tutorial

### Slither Tutorial

This tutorial will guide you through using Slither, a Solidity static analysis tool, to analyze smart contracts.

#### Getting Started

Install Slither with pip install slither-analyzer.\
Run Slither on your Solidity file with the command slither **`filename.sol`**.

#### Analyzing the Code

Once you have Slither running, you will be able to analyze the code. The following commands are helpful when using Slither:

<mark style="color:purple;">`slither file name.sol --tokens`</mark> - This command will show you all the tokens represented in the code.\ <mark style="color:purple;">`slither file name.sol --variables`</mark> - This command will show you all the variables used in the code.\ <mark style="color:purple;">`slither file name.sol --functions`</mark> - This command will show you all the functions defined in the code.\ <mark style="color:purple;">`slither file name.sol --contracts`</mark> - This command will show you all the contracts defined in the code.\
`s`<mark style="color:purple;">`lither file name.sol --dependencies`</mark> - This command will show you all the dependencies the code has.

#### Common Issues

Slither can detect a variety of issues in the code. The following are some of the most common issues it will flag:

* <mark style="color:blue;">**Unused Variables**</mark>
* <mark style="color:blue;">**Unchecked Return Values**</mark>
* <mark style="color:blue;">**Unchecked Sender**</mark>
* <mark style="color:blue;">**Unchecked Call Data**</mark>
* <mark style="color:blue;">**Unchecked Math Operations**</mark>
* <mark style="color:blue;">**Unchecked External Calls**</mark>
* <mark style="color:blue;">**Unchecked Time Dependencies**</mark>
* <mark style="color:blue;">**Reentrancy Vulnerabilities**</mark>

### Conclusion

Slither is a powerful tool for analyzing Solidity code. By using the commands listed above, you can quickly and easily identify issues in your code.
